This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] obvious fix for gthr-posix.h


In __gthread_objc_init_thread_system(void), 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.

Index: gthr-posix.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gthr-posix.h,v
retrieving revision 1.14
diff -u -r1.14 gthr-posix.h
--- gthr-posix.h        2001/05/30 22:38:43     1.14
+++ gthr-posix.h        2001/06/05 11:32:07
@@ -129,8 +129,8 @@
             return 0;
         }
     }
-  else
-    return -1;
+
+  return -1;
 }
 
 /* Close the threads subsystem. */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]