This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] obvious fix for gthr-posix.h
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] obvious fix for gthr-posix.h
- From: Nicola Pero <nicola at brainstorm dot co dot uk>
- Date: Tue, 5 Jun 2001 12:36:06 +0100 (BST)
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. */