diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-04-28 04:03:38 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-04-28 04:03:38 +0000 |
commit | f672076efaa2c99d1dac92070f1723a8a6378456 (patch) | |
tree | 8f9025ebba4470e48a43dd1dd814ba1c8f993734 /sysdeps | |
parent | 109f51f2b2f3331cccc1027f00ef0c752c4ffdaf (diff) | |
download | glibc-f672076efaa2c99d1dac92070f1723a8a6378456.tar glibc-f672076efaa2c99d1dac92070f1723a8a6378456.tar.gz glibc-f672076efaa2c99d1dac92070f1723a8a6378456.tar.bz2 glibc-f672076efaa2c99d1dac92070f1723a8a6378456.zip |
[BZ #4306]
2007-04-27 Ulrich Drepper <drepper@redhat.com>
[BZ #4306]
* sysdeps/unix/sysv/linux/timer_create.c (timer_create):
Initialize the whole sigevent structure to appease valgrind.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/sched_getcpu.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/sched_getcpu.c b/sysdeps/unix/sysv/linux/sched_getcpu.c index d0c0132eb9..e41eee6431 100644 --- a/sysdeps/unix/sysv/linux/sched_getcpu.c +++ b/sysdeps/unix/sysv/linux/sched_getcpu.c @@ -16,6 +16,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <errno.h> #include <sched.h> #include <sysdep.h> @@ -25,11 +26,9 @@ sched_getcpu (void) { #ifdef __NR_getcpu unsigned int cpu; - INTERNAL_SYSCALL_DECL (err); - int r = INTERNAL_SYSCALL (getcpu, err, &cpu, NULL, NULL); + int r = INLINE_SYSCALL (getcpu, 3, &cpu, NULL, NULL); - return (INTERNAL_SYSCALL_ERROR (r, err) - ? INTERNAL_SYSCALL_ERRNO (r, err) : cpu); + return r == -1 ? r : cpu; #else __set_errno (ENOSYS); return -1; |