]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc/police: make print_police static
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 15 Nov 2018 22:36:32 +0000 (14:36 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 19 Nov 2018 19:42:44 +0000 (11:42 -0800)
print_police function only used by m_police.

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

index f3b07f7b0439c172413144b9d8e3a73cbca624a8..d645999ba08bf74537472ba30cab165e9bfe45a8 100644 (file)
 #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);
index 76fd986d6e4cba69450fd1238d66db1b8d7b9320..e22c6da2569669237e0a0803bafc86f83bc92edf 100644 (file)
@@ -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);