From f10648f6c76d02eee019b0a53ea6121101b9d690 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 25 Dec 1997 17:04:15 +0000 Subject: (skip): Compare lseek return value with -1 to allow it to be negative as signed value. --- src/dd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/dd.c b/src/dd.c index 66a9b1180..f71502e62 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) { -- cgit v1.2.3-70-g09d2