]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libiptc: remove unused functions
authorJan Engelhardt <jengelh@medozas.de>
Fri, 23 Oct 2009 21:40:02 +0000 (23:40 +0200)
committerHarald Welte <laforge@gnumonks.org>
Sun, 25 Oct 2009 10:00:33 +0000 (11:00 +0100)
Fix the two warnings in libiptc.c:

  CC     libiptc/libip4tc.lo
libiptc/libiptc.c:1570:1: warning: ‘iptc_num_rules’ defined but not used
libiptc/libiptc.c:1586:1: warning: ‘iptc_get_rule’ defined but not used
  CC     libiptc/libip6tc.lo
libiptc/libiptc.c:1570:1: warning: ‘ip6tc_num_rules’ defined but not used
libiptc/libiptc.c:1586:1: warning: ‘ip6tc_get_rule’ defined but not used

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
libiptc/libiptc.c

index 4c3437e3c7fa0d20084fd81ea8f50bd39afd1d89..b445331e0f31e45574f095adc02dd5f1b9f03b89 100644 (file)
@@ -1563,45 +1563,6 @@ TC_NEXT_RULE(const STRUCT_ENTRY *prev, struct xtc_handle *handle)
        return r->entry;
 }
 
-/* How many rules in this chain? */
-static unsigned int
-TC_NUM_RULES(const char *chain, struct xtc_handle *handle)
-{
-       struct chain_head *c;
-       iptc_fn = TC_NUM_RULES;
-       CHECK(handle);
-
-       c = iptcc_find_label(chain, handle);
-       if (!c) {
-               errno = ENOENT;
-               return (unsigned int)-1;
-       }
-
-       return c->num_rules;
-}
-
-static const STRUCT_ENTRY *
-TC_GET_RULE(const char *chain, unsigned int n, struct xtc_handle *handle)
-{
-       struct chain_head *c;
-       struct rule_head *r;
-
-       iptc_fn = TC_GET_RULE;
-
-       CHECK(handle);
-
-       c = iptcc_find_label(chain, handle);
-       if (!c) {
-               errno = ENOENT;
-               return NULL;
-       }
-
-       r = iptcc_get_rule_num(c, n);
-       if (!r)
-               return NULL;
-       return r->entry;
-}
-
 /* Returns a pointer to the target name of this position. */
 static const char *standard_target_map(int verdict)
 {