summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--condvar.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 260398d..89165d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-01-11 Ben Elliston <bje@cygnus.com>
+
+ * condvar.c (pthread_cond_init): Invert logic when testing the
+ return value from calloc().
+
Sat Jan 9 14:32:08 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* implement.h: Compile-time switch for CYGWIN derived environments
diff --git a/condvar.c b/condvar.c
index 6304391..f9230c1 100644
--- a/condvar.c
+++ b/condvar.c
@@ -299,7 +299,7 @@ pthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr)
cv = (pthread_cond_t) calloc (1, sizeof (*cv));
- if (cv != NULL)
+ if (cv == NULL)
{
result = ENOMEM;
goto FAIL0;