The default crc32 mode fails to diagnose read errors.
* src/cksum.c (cksum_slice8): Fix the check for read errors.
(cksum_pclmul): Likewise.
* NEWS: Mention the bug fix.
** Bug fixes
+ cksum again diagnoses read errors in its default CRC32 mode.
+ [bug introduced in coreutils-9.0]
+
install --strip now supports installing to files with a leading hyphen.
Previously such file names would have caused the strip process to fail.
[This bug was present in "the beginning".]
}
length += bytes_read;
- if (bytes_read == 0)
- {
- if (ferror (fp))
- return false;
- }
-
/* Process multiples of 8 bytes */
datap = (uint32_t *)buf;
while (bytes_read >= 8)
*crc_out = crc;
*length_out = length;
- return true;
+ return !ferror (fp);
}
/* Calculate the checksum and length in bytes of stream STREAM.
}
length += bytes_read;
- if (bytes_read == 0)
- {
- if (ferror (fp))
- return false;
- }
-
datap = (__m128i *)buf;
/* Fold in parallel eight 16-byte blocks into four 16-byte blocks */
*crc_out = crc;
*length_out = length;
- return true;
+ return !ferror (fp);
}