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:
brooks 2007-01-11 20:23:01 +00:00
parent afb4cfc547
commit b069330b5d

View File

@ -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);