mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
85064e683c
commit
6137b0bdf9
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue