From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH iproute2 17/22] tc/ematch: make local functions static Date: Thu, 15 Nov 2018 14:36:35 -0800 Message-ID: <20181115223640.411-18-stephen@networkplumber.org> References: <20181115223640.411-1-stephen@networkplumber.org> Cc: Stephen Hemminger To: netdev@vger.kernel.org Return-path: Received: from mail-pg1-f194.google.com ([209.85.215.194]:37171 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389040AbeKPIqm (ORCPT ); Fri, 16 Nov 2018 03:46:42 -0500 Received: by mail-pg1-f194.google.com with SMTP id 80so9655097pge.4 for ; Thu, 15 Nov 2018 14:36:58 -0800 (PST) In-Reply-To: <20181115223640.411-1-stephen@networkplumber.org> Sender: netdev-owner@vger.kernel.org List-ID: The print handling is only used in tc/m_ematch.c Remove unused function to print_ematch_tree. Signed-off-by: Stephen Hemminger --- tc/m_ematch.c | 30 +++--------------------------- tc/m_ematch.h | 1 - 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/tc/m_ematch.c b/tc/m_ematch.c index a524b520b276..8840a0dc62a1 100644 --- a/tc/m_ematch.c +++ b/tc/m_ematch.c @@ -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 "); - } -} diff --git a/tc/m_ematch.h b/tc/m_ematch.h index 356f2eded7fc..c4443ee22942 100644 --- a/tc/m_ematch.h +++ b/tc/m_ematch.h @@ -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; -- 2.17.1