]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc/ematch: make local functions static
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 15 Nov 2018 22:36:35 +0000 (14:36 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 19 Nov 2018 19:42:44 +0000 (11:42 -0800)
The print handling is only used in tc/m_ematch.c

Remove unused function to print_ematch_tree.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/m_ematch.c
tc/m_ematch.h

index a524b520b27625857aa300a8b3c24a5e6951a0ea..8840a0dc62a16828e7592236c1a783cf760a93c8 100644 (file)
@@ -38,6 +38,8 @@ struct ematch *ematch_root;
 static int begin_argc;
 static char **begin_argv;
 
+static void bstr_print(FILE *fd, const struct bstr *b, int ascii);
+
 static inline void map_warning(int num, char *kind)
 {
        fprintf(stderr,
@@ -548,7 +550,7 @@ unsigned long bstrtoul(const struct bstr *b)
        return l;
 }
 
-void bstr_print(FILE *fd, const struct bstr *b, int ascii)
+static void bstr_print(FILE *fd, const struct bstr *b, int ascii)
 {
        int i;
        char *s = b->data;
@@ -565,29 +567,3 @@ void bstr_print(FILE *fd, const struct bstr *b, int ascii)
                fprintf(fd, "\"");
        }
 }
-
-void print_ematch_tree(const struct ematch *tree)
-{
-       const struct ematch *t;
-
-       for (t = tree; t; t = t->next) {
-               if (t->inverted)
-                       printf("NOT ");
-
-               if (t->child) {
-                       printf("(");
-                       print_ematch_tree(t->child);
-                       printf(")");
-               } else {
-                       struct bstr *b;
-
-                       for (b = t->args; b; b = b->next)
-                               printf("%s%s", b->data, b->next ? " " : "");
-               }
-
-               if (t->relation == TCF_EM_REL_AND)
-                       printf(" AND ");
-               else if (t->relation == TCF_EM_REL_OR)
-                       printf(" OR ");
-       }
-}
index 356f2eded7fc9e2c0c93ab4479b128fdf0afac8b..c4443ee22942d38dad0ab72a943bbb895743f542 100644 (file)
@@ -51,7 +51,6 @@ static inline struct bstr *bstr_next(struct bstr *b)
 }
 
 unsigned long bstrtoul(const struct bstr *b);
-void bstr_print(FILE *fd, const struct bstr *b, int ascii);
 
 struct ematch {
        struct bstr     *args;