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:
+6
-6
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user