summaryrefslogtreecommitdiff
path: root/test/stdout/0530
diff options
context:
space:
mode:
authorPhil Pennock <pdp@exim.org>2014-07-14 02:59:52 -0400
committerPhil Pennock <pdp@exim.org>2014-07-14 02:59:52 -0400
commitcb54b2a05b5f5f3548ac98e74b90eb8633052919 (patch)
treeaea8ddc349e08b12b93202486e7d6351484339ed /test/stdout/0530
parent66be95e02b2ba6a834a6dbee16061176ad85019a (diff)
Fix unsigned < 0 check
Two places in malware.c were using `fsize`, defined as `unsigned int`, to receive the result of `lseek()` and then checking if the value was less than 0. As clang says: ``` malware.c:1228:46: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if ((fsize = lseek(clam_fd, 0, SEEK_END)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ ``` Fix. Use `off_t`, which we're already using elsewhere, then use `fsize_uint` to handle off_t being potentially 64-bit, and a sanity-check on conversion which hopefully won't be optimised away by compilers.
Diffstat (limited to 'test/stdout/0530')
0 files changed, 0 insertions, 0 deletions