From: Samuel Thibault Date: Fri, 30 Nov 2018 01:36:54 +0000 (+0100) Subject: hurd: Fix returning value for fcntl(F_*LK*) X-Git-Tag: glibc-2.29~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6a5bdc18979c09c7a2a9cf23fff8ac5781962ae;p=thirdparty%2Fglibc.git hurd: Fix returning value for fcntl(F_*LK*) to avoid calling va_end again, etc. * sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Directly return value returned by __f_setlk. --- diff --git a/ChangeLog b/ChangeLog index f852a8b299d..f7c43277a20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-11-30 Samuel Thibault + + * sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Directly return value + returned by __f_setlk. + 2018-11-29 H.J. Lu Adhemerval Zanella diff --git a/sysdeps/mach/hurd/fcntl.c b/sysdeps/mach/hurd/fcntl.c index 6fa63f2fc7d..f7f9abce03e 100644 --- a/sysdeps/mach/hurd/fcntl.c +++ b/sysdeps/mach/hurd/fcntl.c @@ -141,9 +141,8 @@ __libc_fcntl (int fd, int cmd, ...) wait = 1; /* FALLTHROUGH */ case F_SETLK: - result = __f_setlk (fd, fl->l_type, fl->l_whence, - fl->l_start, fl->l_len, wait); - break; + return __f_setlk (fd, fl->l_type, fl->l_whence, + fl->l_start, fl->l_len, wait); default: errno = EINVAL; return -1; @@ -166,9 +165,8 @@ __libc_fcntl (int fd, int cmd, ...) wait = 1; /* FALLTHROUGH */ case F_SETLK: - result = __f_setlk (fd, fl->l_type, fl->l_whence, - fl->l_start, fl->l_len, wait); - break; + return __f_setlk (fd, fl->l_type, fl->l_whence, + fl->l_start, fl->l_len, wait); default: errno = EINVAL; return -1;