From 1c9015b2cb483678f153121255e10ec0bbfde3e6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 10 Nov 2008 17:00:41 +0100 Subject: libiptc: remove indirections Signed-off-by: Jan Engelhardt Signed-off-by: Patrick McHardy --- iptables-save.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'iptables-save.c') diff --git a/iptables-save.c b/iptables-save.c index 52b85d82..6252c0b0 100644 --- a/iptables-save.c +++ b/iptables-save.c @@ -79,15 +79,15 @@ static int do_output(const char *tablename) /* Dump out chain names first, * thereby preventing dependency conflicts */ - for (chain = iptc_first_chain(&h); + for (chain = iptc_first_chain(h); chain; - chain = iptc_next_chain(&h)) { + chain = iptc_next_chain(h)) { printf(":%s ", chain); if (iptc_builtin(chain, h)) { struct ipt_counters count; printf("%s ", - iptc_get_policy(chain, &count, &h)); + iptc_get_policy(chain, &count, h)); printf("[%llu:%llu]\n", (unsigned long long)count.pcnt, (unsigned long long)count.bcnt); } else { printf("- [0:0]\n"); @@ -95,16 +95,16 @@ static int do_output(const char *tablename) } - for (chain = iptc_first_chain(&h); + for (chain = iptc_first_chain(h); chain; - chain = iptc_next_chain(&h)) { + chain = iptc_next_chain(h)) { const struct ipt_entry *e; /* Dump out rules */ - e = iptc_first_rule(chain, &h); + e = iptc_first_rule(chain, h); while(e) { - print_rule(e, &h, chain, show_counters); - e = iptc_next_rule(e, &h); + print_rule(e, h, chain, show_counters); + e = iptc_next_rule(e, h); } } @@ -116,7 +116,7 @@ static int do_output(const char *tablename) exit_error(OTHER_PROBLEM, "Binary NYI\n"); } - iptc_free(&h); + iptc_free(h); return 1; } -- cgit v1.2.3