diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-03-29 13:16:15 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-03-29 13:16:15 +0000 |
commit | 4689d80b9a3dac1595ad5514461cd7a3147f9f9b (patch) | |
tree | 13fd6111dffcea4b711df185d2c74a7ef56a383f /sys/net/pf.c | |
parent | 479167afe8afba5cc139b3e52d350f7e4cfb70e9 (diff) |
Declare struct pf_state_key in the mbuf and in_pcb header files to
avoid ugly casts.
OK krw@ tedu@
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index d4f9471db97..c8baaf09b9a 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.820 2013/03/28 00:32:11 bluhm Exp $ */ +/* $OpenBSD: pf.c,v 1.821 2013/03/29 13:16:14 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1018,8 +1018,8 @@ pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int dir, } 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; + m->m_pkthdr.pf.statekey->reverse) + sk = m->m_pkthdr.pf.statekey->reverse; else { if ((sk = RB_FIND(pf_state_tree, &pf_statetbl, (struct pf_state_key *)key)) == NULL) @@ -1027,8 +1027,7 @@ pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int dir, if (dir == PF_OUT && m->m_pkthdr.pf.statekey && pf_compare_state_keys(m->m_pkthdr.pf.statekey, sk, kif, dir) == 0) { - ((struct pf_state_key *) - m->m_pkthdr.pf.statekey)->reverse = sk; + m->m_pkthdr.pf.statekey->reverse = sk; sk->reverse = m->m_pkthdr.pf.statekey; } } |