From 289e92ce8c6c4bbdd877c342f31e0647cc8ccefd Mon Sep 17 00:00:00 2001 From: Laurent Ghigonis Date: Sat, 15 Dec 2012 01:40:45 +0100 Subject: remove unused var in ip_handle() spotted by gcc -Wall --- gg_sniff/pcap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'gg_sniff/pcap.c') diff --git a/gg_sniff/pcap.c b/gg_sniff/pcap.c index f38ef93..02735c8 100644 --- a/gg_sniff/pcap.c +++ b/gg_sniff/pcap.c @@ -347,7 +347,7 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen) struct icmp *icmp; struct in_addr src, dst; u_int src_port, dst_port; - u_int size, proto, close; + u_int proto, close; int response; struct ggnet_conn *conn; struct gg_packet pkt; @@ -385,7 +385,6 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen) src_port = 0; dst_port = 0; proto = IPPROTO_IP; - size = len; close = 0; off = ntohs(ip->ip_off); @@ -408,7 +407,6 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen) src_port = ntohs(tcph->th_sport); dst_port = ntohs(tcph->th_dport); proto = IPPROTO_TCP; - size = len - sizeof(*tcph); if ((tcph->th_flags & TH_FIN) && (tcph->th_flags & TH_ACK)) close = 1; @@ -431,7 +429,6 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen) src_port = ntohs(udph->uh_sport); dst_port = ntohs(udph->uh_dport); proto = IPPROTO_UDP; - size = len - sizeof(*udph); break; case IPPROTO_ICMP: @@ -442,7 +439,6 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen) return; } proto = IPPROTO_ICMP; - size = len - sizeof(*icmp); break; default: -- cgit v1.2.3-59-g8ed1b