[Libsysio-commit] HEAD: libsysio/src lseek.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2004-03-18 14:43:56
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13944 Modified Files: lseek.c Log Message: Lseek backwards was broken -- from Ruth Klundt and the Sandia CTH team. Fixed now. Index: lseek.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- lseek.c 14 Feb 2004 19:42:59 -0000 1.13 +++ lseek.c 18 Mar 2004 14:34:18 -0000 1.14 @@ -91,8 +91,8 @@ _sysio_lseek(int fd, _SYSIO_OFF_T offset return -EINVAL; } pos = off + offset; - if ((offset < 0 && -offset > off) || - (off && offset && pos <= off)) + if ((offset < 0 && -offset >= off) || + (offset > 0 && pos <= off)) return -EINVAL; #ifdef O_LARGEFILE if (pos >= ((fil->f_flags & O_LARGEFILE) ? _SYSIO_OFF_T_MAX : LONG_MAX)) |