From bfce746a87e205a682b85e144e056029a8a30d07 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 31 Aug 1998 16:30:27 +0000 Subject: Update. 1998-08-31 15:56 Ulrich Drepper * db2/db_int.h: Use instead of "db.h" to find header in include. * include/stdio.h: Add __vsscanf. * libio/stdio.h: Make vfscanf, scanf, and vsscanf available if __USE_ISOC9X. Remove __vsscanf declaration. Always declare fgetpos and fsetpos. * math/math.h: Define isinf as macro. * math/bits/mathcalls.h: Change to declare __isinf all the time. Don't declare scalb for ISO C 9x. * math/tgmath.h: Define fma. Rewrite the underlying macros. * stdlib/stdlib.h: Declare strtof and strtold is __USE_ISOC9X. * sysdeps/unix/sysv/linux/bits/sigcontext.h: Allow inclusion from sys/ucontext.h. * sysdeps/wordsize-32/inttypes.h: Define missing PRI* and SCN* macros. 1998-08-31 Andreas Jaeger * sysdeps/standalone/bits/errno.h (ENOMSG): Remove duplicate. Reported by jreising@frequentis.com [PR libc/767]. 1998-08-31 Andreas Jaeger * io/lockf.c (lockf): Move initilisation of fl.l_whence and fl.l_start at beginning of function. Patch by Geoff. Dash [PR libc/769]. --- io/lockf.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'io') diff --git a/io/lockf.c b/io/lockf.c index 6d50490..6e8851b 100644 --- a/io/lockf.c +++ b/io/lockf.c @@ -31,6 +31,11 @@ lockf (int fd, int cmd, off_t len) memset ((char *) &fl, '\0', sizeof (fl)); + /* lockf is always relative to the current file position. */ + fl.l_whence = SEEK_CUR; + fl.l_start = 0; + fl.l_len = len; + switch (cmd) { case F_TEST: @@ -61,11 +66,5 @@ lockf (int fd, int cmd, off_t len) return -1; } - /* lockf is always relative to the current file position. */ - fl.l_whence = SEEK_CUR; - fl.l_start = 0; - - fl.l_len = len; - return __fcntl (fd, cmd, &fl); } -- cgit v1.1