Commit 839800b6 by Paul Warren

Fixes for compilation warnings, reported by David Binderman <dcb314@hotmail.com>

1 parent 96a69148
Pipeline #68 skipped in 0 seconds
Showing with 1 additions and 4 deletions
...@@ -146,7 +146,7 @@ void tick(int print) { ...@@ -146,7 +146,7 @@ void tick(int print) {
if(t - last_timestamp >= RESOLUTION) { if(t - last_timestamp >= RESOLUTION) {
analyse_data(); analyse_data();
if (options.no_curses) { 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(); tui_print();
if (options.timed_output) { if (options.timed_output) {
finish(SIGINT); finish(SIGINT);
...@@ -546,7 +546,6 @@ static void handle_tokenring_packet(unsigned char* args, const struct pcap_pkthd ...@@ -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) 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; register u_int caplen = pkthdr->caplen;
u_int proto; u_int proto;
...@@ -558,11 +557,9 @@ static void handle_ppp_packet(unsigned char* args, const struct pcap_pkthdr* pkt ...@@ -558,11 +557,9 @@ static void handle_ppp_packet(unsigned char* args, const struct pcap_pkthdr* pkt
return; return;
packet += 2; packet += 2;
length -= 2;
proto = EXTRACT_16BITS(packet); proto = EXTRACT_16BITS(packet);
packet += 2; packet += 2;
length -= 2;
if(proto == PPP_IP || proto == ETHERTYPE_IP || proto == ETHERTYPE_IPV6) { if(proto == PPP_IP || proto == ETHERTYPE_IP || proto == ETHERTYPE_IPV6) {
handle_ip_packet((struct ip*)packet, -1); handle_ip_packet((struct ip*)packet, -1);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!