The behavior of pthread_getspecific() when called with an invalid key is

undefined as per Open Group Base Specs. Commented out the code block. It
doesn't do what the preceding comment suggests anyway. In fact the whole
test doesn't quite do what the comment in the header promises.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23010 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2007-11-28 00:14:41 +00:00
parent 92ab20b3a4
commit 78fc510a76
@@ -30,12 +30,12 @@ int main()
void* rc;
/* Verify that the value associated with "key" in a new thread is NULL */
rc = pthread_getspecific(key);
if(rc != NULL)
{
printf("pthread_key_create_2-1 Test FAILED\n");
return PTS_FAIL;
}
// rc = pthread_getspecific(key);
// if(rc != NULL)
// {
// printf("pthread_key_create_2-1 Test FAILED\n");
// return PTS_FAIL;
// }
if(pthread_key_create(&key, NULL) != 0)
{