diff options
author | Michael Haas <haas@computerlinguist.org> | 2015-08-16 13:35:53 +0200 |
---|---|---|
committer | Michael Haas <haas@computerlinguist.org> | 2015-08-16 13:35:53 +0200 |
commit | 212ded54a5b0606fcd95c0675da9ece75e62b9b8 (patch) | |
tree | db559a9f4e10e1b7fd181c91bca3fe7681353dbf /src | |
parent | Remove unused variables (diff) | |
download | firejail-212ded54a5b0606fcd95c0675da9ece75e62b9b8.tar.gz firejail-212ded54a5b0606fcd95c0675da9ece75e62b9b8.tar.zst firejail-212ded54a5b0606fcd95c0675da9ece75e62b9b8.zip |
Fix comparison between unsigned and signed
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/arp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/firejail/arp.c b/src/firejail/arp.c index 37f8716e7..fc60285b2 100644 --- a/src/firejail/arp.c +++ b/src/firejail/arp.c | |||
@@ -131,7 +131,7 @@ int arp_check(const char *dev, uint32_t destaddr, uint32_t srcaddr) { | |||
131 | } | 131 | } |
132 | 132 | ||
133 | // parse the incomming packet | 133 | // parse the incomming packet |
134 | if (len < 14 + sizeof(ArpHdr)) | 134 | if ((unsigned int) len < 14 + sizeof(ArpHdr)) |
135 | continue; | 135 | continue; |
136 | if (frame[12] != (ETH_P_ARP / 256) || frame[13] != (ETH_P_ARP % 256)) | 136 | if (frame[12] != (ETH_P_ARP / 256) || frame[13] != (ETH_P_ARP % 256)) |
137 | continue; | 137 | continue; |
@@ -331,7 +331,7 @@ void arp_scan(const char *dev, uint32_t ifip, uint32_t ifmask) { | |||
331 | 331 | ||
332 | // wait not more than one second for an answer | 332 | // wait not more than one second for an answer |
333 | int header_printed = 0; | 333 | int header_printed = 0; |
334 | int last_ip = 0; | 334 | uint32_t last_ip = 0; |
335 | struct timeval ts; | 335 | struct timeval ts; |
336 | ts.tv_sec = 2; // 2 seconds receive timeout | 336 | ts.tv_sec = 2; // 2 seconds receive timeout |
337 | ts.tv_usec = 0; | 337 | ts.tv_usec = 0; |
@@ -410,7 +410,7 @@ void arp_scan(const char *dev, uint32_t ifip, uint32_t ifmask) { | |||
410 | } | 410 | } |
411 | 411 | ||
412 | // parse the incomming packet | 412 | // parse the incomming packet |
413 | if (len < 14 + sizeof(ArpHdr)) | 413 | if ((unsigned int) len < 14 + sizeof(ArpHdr)) |
414 | continue; | 414 | continue; |
415 | 415 | ||
416 | // look only at ARP packets | 416 | // look only at ARP packets |