[Libsysio-commit] HEAD: libsysio/src lseek.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2004-06-04 14:13:37
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20569/src Modified Files: lseek.c Log Message: From Eric Mei; lseek(fd, -64K, SEEK_END) fails if file size is 64K. Fixed a fence-post calculation in the offset check in _sysio_lseek. Index: lseek.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- lseek.c 30 Apr 2004 19:24:46 -0000 1.19 +++ lseek.c 4 Jun 2004 14:13:27 -0000 1.20 @@ -94,7 +94,7 @@ _sysio_lseek(int fd, _SYSIO_OFF_T offset return -EINVAL; } pos = off + offset; - if ((offset < 0 && -offset >= off) || (offset > 0 && pos <= off)) + if ((offset < 0 && -offset > off) || (offset > 0 && pos <= off)) SYSIO_INTERFACE_RETURN((off_t )-1, -EINVAL); #ifdef O_LARGEFILE |