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 Davis 2007-01-11 20:23:01 +00:00
parent 85064e683c
commit 6137b0bdf9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165955

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