From 839800b6e076dd1733dab8a5e13993ccb36c308b Mon Sep 17 00:00:00 2001 From: Paul Warren Date: Wed, 4 Jan 2017 22:58:24 +0000 Subject: Fixes for compilation warnings, reported by David Binderman --- iftop.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/iftop.c b/iftop.c index 032df61..feec42f 100644 --- a/iftop.c +++ b/iftop.c @@ -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); -- cgit v1.2.3