diff options
author | brooks <brooks@FreeBSD.org> | 2007-01-11 20:23:01 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2007-01-11 20:23:01 +0000 |
commit | b069330b5dbcbbaa7e679c4afe7bfef6aea0f8a2 (patch) | |
tree | 4b65404ca1f0f814754cacc48d5c197e1bb1a7bf /usr.bin/head | |
parent | afb4cfc54730fc4d0a2e88684ce0e206183e1e12 (diff) | |
download | FreeBSD-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.c | 2 |
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); |