From 2d792e656e2819795c575a1abeb8dc54e2357484 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 25 Nov 1997 01:29:16 +0000 Subject: Modify the return values to comply with POSIX. Previously these functions would return -1 and set errno to indicate the specific error. POSIX requires that the functions return the error code as the return value of the function instead. --- lib/libpthread/thread/thr_condattr_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/libpthread/thread/thr_condattr_init.c') diff --git a/lib/libpthread/thread/thr_condattr_init.c b/lib/libpthread/thread/thr_condattr_init.c index f94e438..c87323d 100644 --- a/lib/libpthread/thread/thr_condattr_init.c +++ b/lib/libpthread/thread/thr_condattr_init.c @@ -45,8 +45,7 @@ pthread_condattr_init(pthread_condattr_t *attr) if ((pattr = (pthread_condattr_t) malloc(sizeof(struct pthread_cond_attr))) == NULL) { - errno = ENOMEM; - ret = -1; + ret = ENOMEM; } else { memcpy(pattr, &pthread_condattr_default, sizeof(struct pthread_cond_attr)); -- cgit v1.1