about summary refs log tree commit diff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-11-30 02:36:54 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-11-30 02:41:50 +0100
commitc6a5bdc18979c09c7a2a9cf23fff8ac5781962ae (patch)
tree8f878730081d7586f34da04f3cb9beb3bc31da9f /sysdeps/mach
parenta5275ba5378c9256d18e582572b4315e8edfcbfb (diff)
downloadglibc-c6a5bdc18979c09c7a2a9cf23fff8ac5781962ae.tar.gz
glibc-c6a5bdc18979c09c7a2a9cf23fff8ac5781962ae.tar.xz
glibc-c6a5bdc18979c09c7a2a9cf23fff8ac5781962ae.zip
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.
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/fcntl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sysdeps/mach/hurd/fcntl.c b/sysdeps/mach/hurd/fcntl.c
index 6fa63f2fc7..f7f9abce03 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;