From: Sascha Wildner Date: Wed, 9 Jan 2013 12:37:06 +0000 (+0100) Subject: kernel/net: Remove some unused variables. X-Git-Tag: v3.4.0rc~519 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/1eb2d64e0263716a804e1a0d2c9c3fd28e28d73f kernel/net: Remove some unused variables. --- diff --git a/sys/net/ipfw/ip_fw2.c b/sys/net/ipfw/ip_fw2.c index 941388f66c..dde4323b64 100644 --- a/sys/net/ipfw/ip_fw2.c +++ b/sys/net/ipfw/ip_fw2.c @@ -991,13 +991,13 @@ lookup_dyn_rule(struct ipfw_flow_id *pkt, int *match_direction, #define MATCH_NONE 2 #define MATCH_UNKNOWN 3 int i, dir = MATCH_NONE; - ipfw_dyn_rule *prev, *q=NULL; + ipfw_dyn_rule *q=NULL; if (ipfw_dyn_v == NULL) goto done; /* not found */ i = hash_packet(pkt); - for (prev = NULL, q = ipfw_dyn_v[i]; q != NULL;) { + for (q = ipfw_dyn_v[i]; q != NULL;) { if (q->dyn_type == O_LIMIT_PARENT) goto next; @@ -1026,7 +1026,6 @@ lookup_dyn_rule(struct ipfw_flow_id *pkt, int *match_direction, } } next: - prev = q; q = q->next; } if (q == NULL) diff --git a/sys/net/pf/pf.c b/sys/net/pf/pf.c index 3562cace4e..c43c47f695 100644 --- a/sys/net/pf/pf.c +++ b/sys/net/pf/pf.c @@ -3188,7 +3188,6 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, int match = 0; int state_icmp = 0; u_int16_t sport = 0, dport = 0; - u_int16_t nport = 0, bport = 0; u_int16_t bproto_sum = 0, bip_sum = 0; u_int8_t icmptype = 0, icmpcode = 0; @@ -3256,7 +3255,6 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, r = TAILQ_FIRST(pf_main_ruleset.rules[PF_RULESET_FILTER].active.ptr); - bport = nport = sport; /* check packet for BINAT/NAT/RDR */ if ((nr = pf_get_translation(pd, m, off, direction, kif, &nsn, &skw, &sks, &sk, &nk, saddr, daddr, sport, dport)) != NULL) { diff --git a/sys/net/pf/pf_norm.c b/sys/net/pf/pf_norm.c index b654c4fb35..e6c4dec67a 100644 --- a/sys/net/pf/pf_norm.c +++ b/sys/net/pf/pf_norm.c @@ -813,7 +813,6 @@ pf_normalize_ip(struct mbuf **m0, int dir, struct pfi_kif *kif, u_short *reason, u_int16_t fragoff = (h->ip_off & IP_OFFMASK) << 3; u_int16_t max; int ip_len; - int ip_off; int tag = -1; r = TAILQ_FIRST(pf_main_ruleset.rules[PF_RULESET_SCRUB].active.ptr); @@ -877,7 +876,6 @@ pf_normalize_ip(struct mbuf **m0, int dir, struct pfi_kif *kif, u_short *reason, } ip_len = h->ip_len - hlen; - ip_off = (h->ip_off & IP_OFFMASK) << 3; /* All fragments are 8 byte aligned */ if (mff && (ip_len & 0x7)) {