]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(skip): Compare lseek return value with -1 to allow it
authorJim Meyering <jim@meyering.net>
Thu, 25 Dec 1997 17:04:15 +0000 (17:04 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 25 Dec 1997 17:04:15 +0000 (17:04 +0000)
to be negative as signed value.

src/dd.c

index 66a9b11806e8ee60948726c43af42786213f530f..f71502e6207c1224bf25cd0af490c1d343d7678b 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -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)
        {