diff options
author | Paul Warren <pdw@ex-parrot.com> | 2017-01-04 22:58:24 +0000 |
---|---|---|
committer | Paul Warren <pdw@ex-parrot.com> | 2017-01-04 22:58:24 +0000 |
commit | 839800b6e076dd1733dab8a5e13993ccb36c308b (patch) | |
tree | 01358be514dd2040bd6d6506f5233ba9fa485c08 | |
parent | 96a691484e6e3c6fa415b46e466c85323d017baa (diff) | |
download | iftop-839800b6e076dd1733dab8a5e13993ccb36c308b.zip |
Fixes for compilation warnings, reported by David Binderman <dcb314@hotmail.com>
-rw-r--r-- | iftop.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -146,7 +146,7 @@ void tick(int print) { if(t - last_timestamp >= RESOLUTION) { analyse_data(); if (options.no_curses) { - if (!options.timed_output || (options.timed_output && t - first_timestamp >= options.timed_output)) { + if (!options.timed_output || (t - first_timestamp >= options.timed_output)) { tui_print(); if (options.timed_output) { finish(SIGINT); @@ -546,7 +546,6 @@ static void handle_tokenring_packet(unsigned char* args, const struct pcap_pkthd static void handle_ppp_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet) { - register u_int length = pkthdr->len; register u_int caplen = pkthdr->caplen; u_int proto; @@ -558,11 +557,9 @@ static void handle_ppp_packet(unsigned char* args, const struct pcap_pkthdr* pkt return; packet += 2; - length -= 2; proto = EXTRACT_16BITS(packet); packet += 2; - length -= 2; if(proto == PPP_IP || proto == ETHERTYPE_IP || proto == ETHERTYPE_IPV6) { handle_ip_packet((struct ip*)packet, -1); |