diff options
author | melifaro <melifaro@FreeBSD.org> | 2014-11-09 17:01:54 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2014-11-09 17:01:54 +0000 |
commit | 5edf5a79dce37dbfc44a43abe31898adbd5a6c95 (patch) | |
tree | 9bc51532b84b0cc997d5619d14ef6a298e767783 /sys/netpfil/pf/pf.c | |
parent | 94efd072082f2aa7271c5e38f084a187e8314c62 (diff) | |
download | FreeBSD-src-5edf5a79dce37dbfc44a43abe31898adbd5a6c95.zip FreeBSD-src-5edf5a79dce37dbfc44a43abe31898adbd5a6c95.tar.gz |
Finish r274315: remove union 'u' from struct pf_send_entry.
Suggested by: kib
Diffstat (limited to 'sys/netpfil/pf/pf.c')
-rw-r--r-- | sys/netpfil/pf/pf.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8528af9..15667a6 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -139,16 +139,11 @@ struct pf_send_entry { PFSE_ICMP, PFSE_ICMP6, } pfse_type; - union { - struct { - int type; - int code; - int mtu; - } icmpopts; - } u; -#define pfse_icmp_type u.icmpopts.type -#define pfse_icmp_code u.icmpopts.code -#define pfse_icmp_mtu u.icmpopts.mtu + struct { + int type; + int code; + int mtu; + } icmpopts; }; STAILQ_HEAD(pf_send_head, pf_send_entry); @@ -1368,8 +1363,8 @@ pf_intr(void *v) ip_output(pfse->pfse_m, NULL, NULL, 0, NULL, NULL); break; case PFSE_ICMP: - icmp_error(pfse->pfse_m, pfse->pfse_icmp_type, - pfse->pfse_icmp_code, 0, pfse->pfse_icmp_mtu); + icmp_error(pfse->pfse_m, pfse->icmpopts.type, + pfse->icmpopts.code, 0, pfse->icmpopts.mtu); break; #endif /* INET */ #ifdef INET6 @@ -1378,8 +1373,8 @@ pf_intr(void *v) NULL); break; case PFSE_ICMP6: - icmp6_error(pfse->pfse_m, pfse->pfse_icmp_type, - pfse->pfse_icmp_code, pfse->pfse_icmp_mtu); + icmp6_error(pfse->pfse_m, pfse->icmpopts.type, + pfse->icmpopts.code, pfse->icmpopts.mtu); break; #endif /* INET6 */ default: @@ -2411,8 +2406,8 @@ pf_send_icmp(struct mbuf *m, u_int8_t type, u_int8_t code, sa_family_t af, #endif /* INET6 */ } pfse->pfse_m = m0; - pfse->pfse_icmp_type = type; - pfse->pfse_icmp_code = code; + pfse->icmpopts.type = type; + pfse->icmpopts.code = code; pf_send(pfse); } |