OSDN Git Service

linuxthreads.old: pass back up saved_errno value in manager init
authorMike Frysinger <vapier@gentoo.org>
Tue, 24 Apr 2012 05:33:41 +0000 (01:33 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 24 Apr 2012 05:39:15 +0000 (01:39 -0400)
This matches the newer linuxthreads code, and fixes the build warning:

libpthread/linuxthreads.old/manager.c: In function 'pthread_handle_create':
libpthread/linuxthreads.old/manager.c:487:7: warning:
variable 'saved_errno' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
libpthread/linuxthreads.old/manager.c

index 85fee5e..1cae6e4 100644 (file)
@@ -666,7 +666,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
     __pthread_handles[sseg].h_descr = NULL;
     __pthread_handles[sseg].h_bottom = NULL;
     __pthread_handles_num--;
-    return errno;
+    return saved_errno;
   }
   PDEBUG("new thread pid = %d\n", pid);