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
afb4cfc547
commit
b069330b5d
@ -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