diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-07-20 15:04:54 -0400 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-08-19 12:25:43 -0700 |
commit | a229463eaf29e5a4094413805e854e3cd19d73fb (patch) | |
tree | 38ad0afeb32a6e7ce6afc6d488c184983a740160 /libc/sysdeps/linux/common/bits/syscalls-common.h | |
parent | 1cb3602ad09298ff25409cb8f1bd2254258669d2 (diff) | |
download | uClibc-alpine-a229463eaf29e5a4094413805e854e3cd19d73fb.tar.bz2 uClibc-alpine-a229463eaf29e5a4094413805e854e3cd19d73fb.tar.xz |
INLINE_SYSCALL_NCS: scope out local vars to avoid conflicts
The INLINE_SYSCALL_NCS() macro was using "res" and "err" as local variable
names, but this caused conflicts with some code (like clock_getres) whose
arguments were named the same.
libc/sysdeps/linux/common/clock_getres.c: In function 'clock_getres':
libc/sysdeps/linux/common/clock_getres.c:15: warning: 'res' is used uninitialized in this function
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/sysdeps/linux/common/bits/syscalls-common.h')
-rw-r--r-- | libc/sysdeps/linux/common/bits/syscalls-common.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/common/bits/syscalls-common.h b/libc/sysdeps/linux/common/bits/syscalls-common.h index 2aef89c6e..78bbf6c22 100644 --- a/libc/sysdeps/linux/common/bits/syscalls-common.h +++ b/libc/sysdeps/linux/common/bits/syscalls-common.h @@ -38,13 +38,13 @@ #ifndef INLINE_SYSCALL_NCS # define INLINE_SYSCALL_NCS(name, nr, args...) \ ({ \ - INTERNAL_SYSCALL_DECL(err); \ - long res = INTERNAL_SYSCALL_NCS(name, err, nr, args); \ - if (unlikely(INTERNAL_SYSCALL_ERROR_P(res, err))) { \ - __set_errno(INTERNAL_SYSCALL_ERRNO(res, err)); \ - res = -1L; \ + INTERNAL_SYSCALL_DECL(__err); \ + long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \ + if (unlikely(INTERNAL_SYSCALL_ERROR_P(__res, __err))) { \ + __set_errno(INTERNAL_SYSCALL_ERRNO(__res, __err)); \ + __res = -1L; \ } \ - res; \ + __res; \ }) #endif |