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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user