1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-05 00:07:51 +02:00

(skip): Compare lseek return value with -1 to allow it

to be negative as signed value.
This commit is contained in:
Jim Meyering
1997-12-25 17:04:15 +00:00
parent d9f1fd86d9
commit f10648f6c7
+1 -1
View File
@@ -431,7 +431,7 @@ skip (int fdesc, char *file, uintmax_t records, size_t blocksize,
operation, fall back on using read. */
o = records * blocksize;
if (o / blocksize != records
|| lseek (fdesc, o, SEEK_SET) < 0)
|| lseek (fdesc, o, SEEK_SET) == -1)
{
while (records-- > 0)
{