From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH iproute2 14/22] tc/police: make print_police static Date: Thu, 15 Nov 2018 14:36:32 -0800 Message-ID: <20181115223640.411-15-stephen@networkplumber.org> References: <20181115223640.411-1-stephen@networkplumber.org> Cc: Stephen Hemminger To: netdev@vger.kernel.org Return-path: Received: from mail-pg1-f193.google.com ([209.85.215.193]:39574 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389029AbeKPIqj (ORCPT ); Fri, 16 Nov 2018 03:46:39 -0500 Received: by mail-pg1-f193.google.com with SMTP id r9-v6so9649509pgv.6 for ; Thu, 15 Nov 2018 14:36:55 -0800 (PST) In-Reply-To: <20181115223640.411-1-stephen@networkplumber.org> Sender: netdev-owner@vger.kernel.org List-ID: print_police function only used by m_police. Signed-off-by: Stephen Hemminger --- tc/m_police.c | 10 +++++++--- tc/tc_util.h | 3 --- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tc/m_police.c b/tc/m_police.c index f3b07f7b0439..d645999ba08b 100644 --- a/tc/m_police.c +++ b/tc/m_police.c @@ -25,6 +25,10 @@ #include "utils.h" #include "tc_util.h" +static int act_parse_police(struct action_util *a, int *argc_p, + char ***argv_p, int tca_id, struct nlmsghdr *n); +static int print_police(struct action_util *a, FILE *f, struct rtattr *tb); + struct action_util police_action_util = { .id = "police", .parse_aopt = act_parse_police, @@ -50,8 +54,8 @@ static void explain1(char *arg) fprintf(stderr, "Illegal \"%s\"\n", arg); } -int act_parse_police(struct action_util *a, int *argc_p, char ***argv_p, - int tca_id, struct nlmsghdr *n) +static int act_parse_police(struct action_util *a, int *argc_p, char ***argv_p, + int tca_id, struct nlmsghdr *n) { int argc = *argc_p; char **argv = *argv_p; @@ -256,7 +260,7 @@ int parse_police(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n) return act_parse_police(NULL, argc_p, argv_p, tca_id, n); } -int print_police(struct action_util *a, FILE *f, struct rtattr *arg) +static int print_police(struct action_util *a, FILE *f, struct rtattr *arg) { SPRINT_BUF(b1); SPRINT_BUF(b2); diff --git a/tc/tc_util.h b/tc/tc_util.h index 76fd986d6e4c..e22c6da25696 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -117,9 +117,6 @@ int parse_action_control_slash(int *argc_p, char ***argv_p, int *result1_p, int *result2_p, bool allow_num); void print_action_control(FILE *f, const char *prefix, int action, const char *suffix); -int act_parse_police(struct action_util *a, int *argc_p, - char ***argv_p, int tca_id, struct nlmsghdr *n); -int print_police(struct action_util *a, FILE *f, struct rtattr *tb); int police_print_xstats(struct action_util *a, FILE *f, struct rtattr *tb); int tc_print_action(FILE *f, const struct rtattr *tb, unsigned short tot_acts); int tc_print_ipt(FILE *f, const struct rtattr *tb); -- 2.17.1