(__gthread_objc_init_thread_system): If pthread_key_create fails, it's not clear...
authorNicola Pero <nicola@brainstorm.co.uk>
Sat, 9 Jun 2001 18:05:09 +0000 (18:05 +0000)
committerOvidiu Predescu <ovidiu@gcc.gnu.org>
Sat, 9 Jun 2001 18:05:09 +0000 (18:05 +0000)
(__gthread_objc_init_thread_system): If pthread_key_create fails, it's
not clear what the return value is.  This obvious fix makes sure it
always returns -1 if a problem occurs.

From-SVN: r43091

gcc/gthr-posix.h

index 2042ebe05639eba1956460091577eaabe2818dd0..eae8f3e12ab618b2162665cce44e999f46841983 100644 (file)
@@ -129,8 +129,8 @@ __gthread_objc_init_thread_system(void)
             return 0;
         }
     }
-  else
-    return -1;
+
+  return -1;
 }
 
 /* Close the threads subsystem. */