diff --git a/usr.bin/head/head.c b/usr.bin/head/head.c index 36aa9bf6cae..5de0cba1316 100644 --- a/usr.bin/head/head.c +++ b/usr.bin/head/head.c @@ -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);