(lockf): Move initilisation of fl.l_whence and fl.l_start at beginning

of function.
This commit is contained in:
Ulrich Drepper 1998-09-01 18:32:10 +00:00
parent 50197d2585
commit 66853af29c

View File

@ -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);
}