Date: Sun, 10 Jan 2016 00:28:44 +0000 (UTC) From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293625 - head/sys/netpfil/ipfw Message-ID: <201601100028.u0A0SiL6085646@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: melifaro Date: Sun Jan 10 00:28:44 2016 New Revision: 293625 URL: https://svnweb.freebsd.org/changeset/base/293625 Log: Use already pre-calculated number of entries instead of tc->count. Modified: head/sys/netpfil/ipfw/ip_fw_table.c Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Sun Jan 10 00:01:03 2016 (r293624) +++ head/sys/netpfil/ipfw/ip_fw_table.c Sun Jan 10 00:28:44 2016 (r293625) @@ -2097,7 +2097,7 @@ export_table_info(struct ip_fw_chain *ch 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601100028.u0A0SiL6085646>