diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2008-06-11 03:36:34 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2008-06-11 03:36:34 +0000 |
commit | 3ec03d32e38a0f48243f4e12147f9c84b2190c0c (patch) | |
tree | 85c275371a0ef1c2c2b4904d6fc018e883a46c2f /sys/net/pf.c | |
parent | daca7c3f8a5ecda401fb9d5a6c9a2efaa05873c8 (diff) |
superfluous to check for m != NULL in pf_find_state, it is plain
impossible that m is NULL here since all callers dereference it
unconditionally beforehands, and find state without and mbuf doesn't
make sense in the first place
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 697cfdd986a..e8216a12de2 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.593 2008/06/11 03:28:10 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.594 2008/06/11 03:36:33 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -870,19 +870,19 @@ pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int dir, pf_status.fcounters[FCNT_STATE_SEARCH]++; - if (dir == PF_OUT && m && m->m_pkthdr.pf.statekey && + if (dir == PF_OUT && m->m_pkthdr.pf.statekey && ((struct pf_state_key *)m->m_pkthdr.pf.statekey)->reverse) sk = ((struct pf_state_key *)m->m_pkthdr.pf.statekey)->reverse; else { if ((sk = RB_FIND(pf_state_tree, &pf_statetbl, (struct pf_state_key *)key)) == NULL) return (NULL); - if (m && m->m_pkthdr.pf.statekey) + if (m->m_pkthdr.pf.statekey) ((struct pf_state_key *) m->m_pkthdr.pf.statekey)->reverse = sk; } - if (dir == PF_OUT && m) + if (dir == PF_OUT) m->m_pkthdr.pf.statekey = NULL; /* list is sorted, if-bound states before floating ones */ |