Fix build on architectures where off_t is signed by casting to uintmax_t
before comparing with a size_t.
This commit is contained in:
parent
85064e683c
commit
6137b0bdf9
@ -146,7 +146,7 @@ head_bytes(FILE *fp, off_t cnt)
|
||||
size_t readlen;
|
||||
|
||||
while (cnt) {
|
||||
if (cnt < sizeof(buf))
|
||||
if ((uintmax_t)cnt < sizeof(buf))
|
||||
readlen = cnt;
|
||||
else
|
||||
readlen = sizeof(buf);
|
||||
|
Loading…
Reference in New Issue
Block a user