diff options
author | Thomas Habets <thomas@habets.se> | 2022-10-30 18:17:21 +0000 |
---|---|---|
committer | Thomas Habets <thomas@habets.se> | 2022-10-30 18:17:30 +0000 |
commit | 5352988a141fbd410f0ecc9028d89e6a185d5365 (patch) | |
tree | d0c60f4984d984571a74056954f430d7b841dfee | |
parent | 7afbcee1147095ed4f65e9bc061deb27eeed91d8 (diff) | |
download | arping-5352988a141fbd410f0ecc9028d89e6a185d5365.tar.gz |
fuzz: Remove Wconversion warnings
Warnings: 26->22
-rw-r--r-- | src/fuzz_pingip.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fuzz_pingip.c b/src/fuzz_pingip.c index ebc7a4f..ac2fc3e 100644 --- a/src/fuzz_pingip.c +++ b/src/fuzz_pingip.c @@ -49,17 +49,17 @@ main() fprintf(stderr, "read(): %s\n", strerror(errno)); return 1; } - size -= n; + size -= (size_t)n; p += n; } - packet_size = p - packet; + packet_size = (size_t)(p - packet); } struct pcap_pkthdr pkthdr; pkthdr.ts.tv_sec = time(NULL); pkthdr.ts.tv_usec = 0; - pkthdr.len = packet_size; - pkthdr.caplen = packet_size; + pkthdr.len = (uint32_t)packet_size; + pkthdr.caplen = (uint32_t)packet_size; dstip = htonl(0x12345678); pingip_recv(NULL, &pkthdr, packet); |