summaryrefslogtreecommitdiffstats
path: root/usr.bin/head
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2007-01-11 20:23:01 +0000
committerbrooks <brooks@FreeBSD.org>2007-01-11 20:23:01 +0000
commitb069330b5dbcbbaa7e679c4afe7bfef6aea0f8a2 (patch)
tree4b65404ca1f0f814754cacc48d5c197e1bb1a7bf /usr.bin/head
parentafb4cfc54730fc4d0a2e88684ce0e206183e1e12 (diff)
downloadFreeBSD-src-b069330b5dbcbbaa7e679c4afe7bfef6aea0f8a2.zip
FreeBSD-src-b069330b5dbcbbaa7e679c4afe7bfef6aea0f8a2.tar.gz
Fix build on architectures where off_t is signed by casting to uintmax_t
before comparing with a size_t.
Diffstat (limited to 'usr.bin/head')
-rw-r--r--usr.bin/head/head.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/head/head.c b/usr.bin/head/head.c
index 36aa9bf..5de0cba 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);
OpenPOWER on IntegriCloud