From 2caca60d065b659f7d42500a95e50c073d4a33a0 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 13 Oct 2015 12:00:45 -0700 Subject: Use INLINE_SYSCALL_ERROR_RETURN_VALUE This patch replaces { __set_errno (ERRNO); return -1; } with INLINE_SYSCALL_ERROR_RETURN_VALUE (ERRNO). * sysdeps/unix/sysv/linux/adjtime.c (ADJTIME): Use INLINE_SYSCALL_ERROR_RETURN_VALUE. * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise. * sysdeps/unix/sysv/linux/eventfd.c (eventfd): Likewise. * sysdeps/unix/sysv/linux/faccessat.c (faccessat): Likewise. * sysdeps/unix/sysv/linux/fchmodat.c (fchmodat): Likewise. * sysdeps/unix/sysv/linux/fcntl.c (do_fcntl): Likewise. * sysdeps/unix/sysv/linux/futimens.c (futimens): Likewise. * sysdeps/unix/sysv/linux/futimes.c (__futimes): Likewise. * sysdeps/unix/sysv/linux/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/linux/fxstatat.c (__fxstatat): Likewise. * sysdeps/unix/sysv/linux/fxstatat64.c (__fxstatat64): Likewise. * sysdeps/unix/sysv/linux/lutimes.c (lutimes): Likewise. * sysdeps/unix/sysv/linux/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/lxstat64.c (___lxstat64): Likewise. * sysdeps/unix/sysv/linux/mmap64.c (__mmap64): Likewise. * sysdeps/unix/sysv/linux/mq_open.c (__mq_open): Likewise. * sysdeps/unix/sysv/linux/mq_unlink.c (mq_unlink): Likewise. * sysdeps/unix/sysv/linux/prlimit.c (prlimit): Likewise. * sysdeps/unix/sysv/linux/readahead.c (__readahead): Likewise. * sysdeps/unix/sysv/linux/shmat.c (shmat): Likewise. * sysdeps/unix/sysv/linux/signalfd.c (signalfd): Likewise. * sysdeps/unix/sysv/linux/speed.c (cfsetospeed): Likewise. * sysdeps/unix/sysv/linux/tcsetattr.c (tcsetattr): Likewise. * sysdeps/unix/sysv/linux/ustat.c (ustat): Likewise. * sysdeps/unix/sysv/linux/utimensat.c (utimensat): Likewise. * sysdeps/unix/sysv/linux/xmknod.c (__xmknod): Likewise. * sysdeps/unix/sysv/linux/xmknodat.c (__xmknodat): Likewise. * sysdeps/unix/sysv/linux/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/linux/xstatconv.c (__xstat_conv): Likewise. (__xstat64_conv): Likewise. (__xstat32_conv): Likewise. --- sysdeps/unix/sysv/linux/prlimit.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'sysdeps/unix/sysv/linux/prlimit.c') diff --git a/sysdeps/unix/sysv/linux/prlimit.c b/sysdeps/unix/sysv/linux/prlimit.c index db88ba893c..b6e6e1c7e8 100644 --- a/sysdeps/unix/sysv/linux/prlimit.c +++ b/sysdeps/unix/sysv/linux/prlimit.c @@ -59,20 +59,14 @@ prlimit (__pid_t pid, enum __rlimit_resource resource, if (old_rlimit->rlim_cur != old_rlimit64_mem.rlim_cur) { if (new_rlimit == NULL) - { - __set_errno (EOVERFLOW); - return -1; - } + return INLINE_SYSCALL_ERROR_RETURN_VALUE (EOVERFLOW); old_rlimit->rlim_cur = RLIM_INFINITY; } old_rlimit->rlim_max = old_rlimit64_mem.rlim_max; if (old_rlimit->rlim_max != old_rlimit64_mem.rlim_max) { if (new_rlimit == NULL) - { - __set_errno (EOVERFLOW); - return -1; - } + return INLINE_SYSCALL_ERROR_RETURN_VALUE (EOVERFLOW); old_rlimit->rlim_max = RLIM_INFINITY; } } @@ -84,8 +78,7 @@ int prlimit (__pid_t pid, enum __rlimit_resource resource, const struct rlimit *new_rlimit, struct rlimit *old_rlimit) { - __set_errno (ENOSYS); - return -1; + return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOSYS); } stub_warning (prlimit) #endif -- cgit 1.4.1