From a1cf3074e2eae780226c79477e895479ba6e29f2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 30 Apr 2013 19:40:04 +0200 Subject: [PATCH] Remove unused "running" argument form fw3_lookup_ipset() --- ipsets.c | 5 ++--- ipsets.h | 3 +-- redirects.c | 2 +- rules.c | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ipsets.c b/ipsets.c index ecccd69..baa0949 100644 --- a/ipsets.c +++ b/ipsets.c @@ -365,8 +365,7 @@ fw3_create_ipsets(struct fw3_state *state) list_for_each_entry(ipset, &state->ipsets, list) if (!hasbit(ipset->flags[0], FW3_FLAG_DELETED)) - if (!fw3_lookup_ipset(state, ipset->name, true)) - create_ipset(ipset, state); + create_ipset(ipset, state); fw3_pr("quit\n"); } @@ -391,7 +390,7 @@ fw3_destroy_ipsets(struct fw3_state *state, enum fw3_family family) } struct fw3_ipset * -fw3_lookup_ipset(struct fw3_state *state, const char *name, bool running) +fw3_lookup_ipset(struct fw3_state *state, const char *name) { struct fw3_ipset *s; diff --git a/ipsets.h b/ipsets.h index 186a417..cbab741 100644 --- a/ipsets.h +++ b/ipsets.h @@ -29,8 +29,7 @@ void fw3_load_ipsets(struct fw3_state *state, struct uci_package *p); void fw3_create_ipsets(struct fw3_state *state); void fw3_destroy_ipsets(struct fw3_state *state, enum fw3_family family); -struct fw3_ipset * fw3_lookup_ipset(struct fw3_state *state, const char *name, - bool running); +struct fw3_ipset * fw3_lookup_ipset(struct fw3_state *state, const char *name); #define fw3_free_ipset(ipset) \ fw3_free_object(ipset, fw3_ipset_opts) diff --git a/redirects.c b/redirects.c index 45d04c8..6ea91b8 100644 --- a/redirects.c +++ b/redirects.c @@ -177,7 +177,7 @@ fw3_load_redirects(struct fw3_state *state, struct uci_package *p) continue; } else if (redir->ipset.set && !redir->ipset.any && - !(redir->_ipset = fw3_lookup_ipset(state, redir->ipset.name, false))) + !(redir->_ipset = fw3_lookup_ipset(state, redir->ipset.name))) { warn_elem(e, "refers to unknown ipset '%s'", redir->ipset.name); fw3_free_redirect(redir); diff --git a/rules.c b/rules.c index 36bb6ce..5a6ea00 100644 --- a/rules.c +++ b/rules.c @@ -134,7 +134,7 @@ fw3_load_rules(struct fw3_state *state, struct uci_package *p) continue; } else if (rule->ipset.set && !rule->ipset.any && - !(rule->_ipset = fw3_lookup_ipset(state, rule->ipset.name, false))) + !(rule->_ipset = fw3_lookup_ipset(state, rule->ipset.name))) { warn_elem(e, "refers to unknown ipset '%s'", rule->ipset.name); fw3_free_rule(rule); -- 2.30.2