diff options
author | melifaro <melifaro@FreeBSD.org> | 2016-01-10 00:28:44 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2016-01-10 00:28:44 +0000 |
commit | 155575feb3c0b53f819cab936c7a61957251ca6d (patch) | |
tree | c1e40b085f099f49d3b69f15c928d6a2d2f66beb /sys/netpfil | |
parent | 04e23a35203c46b5788dcebb5aa731cfd2ae178d (diff) | |
download | FreeBSD-src-155575feb3c0b53f819cab936c7a61957251ca6d.zip FreeBSD-src-155575feb3c0b53f819cab936c7a61957251ca6d.tar.gz |
Use already pre-calculated number of entries instead of tc->count.
Diffstat (limited to 'sys/netpfil')
-rw-r--r-- | sys/netpfil/ipfw/ip_fw_table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c index 71c96b2..a1ee5dd 100644 --- a/sys/netpfil/ipfw/ip_fw_table.c +++ b/sys/netpfil/ipfw/ip_fw_table.c @@ -2097,7 +2097,7 @@ export_table_info(struct ip_fw_chain *ch, struct table_config *tc, i->count = table_get_count(ch, tc); i->limit = tc->limit; i->flags |= (tc->locked != 0) ? IPFW_TGFLAGS_LOCKED : 0; - i->size = tc->count * sizeof(ipfw_obj_tentry); + i->size = i->count * sizeof(ipfw_obj_tentry); i->size += sizeof(ipfw_obj_header) + sizeof(ipfw_xtable_info); strlcpy(i->tablename, tc->tablename, sizeof(i->tablename)); ti = KIDX_TO_TI(ch, tc->no.kidx); |