diff options
author | Thomas Habets <thomas@habets.se> | 2022-11-02 22:37:35 +0000 |
---|---|---|
committer | Thomas Habets <thomas@habets.se> | 2022-11-02 22:37:35 +0000 |
commit | 9280306c4a95487de7e28aec660a0e58553d2b6f (patch) | |
tree | 21d0ff2cb700ba610ab58cb5396102c59b6e0456 | |
parent | 5352988a141fbd410f0ecc9028d89e6a185d5365 (diff) | |
download | arping-9280306c4a95487de7e28aec660a0e58553d2b6f.tar.gz |
Explicitly cast double to uint32, to suppress warning
-rw-r--r-- | src/arping.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/arping.c b/src/arping.c index b16755e..58060cb 100644 --- a/src/arping.c +++ b/src/arping.c @@ -1227,7 +1227,10 @@ wait_time(double deadline, uint32_t packetwait) if (max_wait > packetwait / 1000000.0) { return packetwait; } - return max_wait * 1000000; + + // TODO: check for overflows. Though what's the worst that + // could happen? + return (uint32_t)(max_wait * 1000000); } /** |