diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2007-01-11 20:23:01 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2007-01-11 20:23:01 +0000 |
commit | 6137b0bdf97237459bf2d368eed42360f5b7451b (patch) | |
tree | 4b65404ca1f0f814754cacc48d5c197e1bb1a7bf /usr.bin/head/head.c | |
parent | 85064e683c74e84e6a06a199c6ea6ff80bee372c (diff) | |
download | src-6137b0bdf97237459bf2d368eed42360f5b7451b.tar.gz src-6137b0bdf97237459bf2d368eed42360f5b7451b.zip |
Fix build on architectures where off_t is signed by casting to uintmax_t
before comparing with a size_t.
Notes
Notes:
svn path=/head/; revision=165955
Diffstat (limited to 'usr.bin/head/head.c')
-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 36aa9bf6cae5..5de0cba13168 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); |