From: Jim Meyering Date: Thu, 25 Dec 1997 17:04:15 +0000 (+0000) Subject: (skip): Compare lseek return value with -1 to allow it X-Git-Tag: FILEUTILS-3_16h~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f10648f6c76d02eee019b0a53ea6121101b9d690;p=thirdparty%2Fcoreutils.git (skip): Compare lseek return value with -1 to allow it to be negative as signed value. --- diff --git a/src/dd.c b/src/dd.c index 66a9b11806..f71502e620 100644 --- 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) {