From 0b63936140032deac44072951451bdf47b54296a Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sat, 8 Sep 2007 16:00:01 +0000 Subject: Fix more sparse warnings: non-C99 array declaration, incorrect function prototypes --- ip6tables.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'ip6tables.c') diff --git a/ip6tables.c b/ip6tables.c index d43029eb..3a54c86f 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -267,27 +267,7 @@ static void free_opts(int reset_offset) } } -void -exit_error(enum exittype status, const char *msg, ...) -{ - va_list args; - - va_start(args, msg); - fprintf(stderr, "%s v%s: ", program_name, program_version); - vfprintf(stderr, msg, args); - va_end(args); - fprintf(stderr, "\n"); - if (status == PARAMETER_PROBLEM) - exit_tryhelp(status); - if (status == VERSION_PROBLEM) - fprintf(stderr, - "Perhaps ip6tables or your kernel needs to be upgraded.\n"); - /* On error paths, make sure that we don't leak memory */ - free_opts(1); - exit(status); -} - -void +static void exit_tryhelp(int status) { if (line != -1) @@ -298,7 +278,7 @@ exit_tryhelp(int status) exit(status); } -void +static void exit_printhelp(struct ip6tables_rule_match *matches) { struct ip6tables_rule_match *matchp = NULL; @@ -380,6 +360,26 @@ exit_printhelp(struct ip6tables_rule_match *matches) exit(0); } +void +exit_error(enum exittype status, const char *msg, ...) +{ + va_list args; + + va_start(args, msg); + fprintf(stderr, "%s v%s: ", program_name, program_version); + vfprintf(stderr, msg, args); + va_end(args); + fprintf(stderr, "\n"); + if (status == PARAMETER_PROBLEM) + exit_tryhelp(status); + if (status == VERSION_PROBLEM) + fprintf(stderr, + "Perhaps ip6tables or your kernel needs to be upgraded.\n"); + /* On error paths, make sure that we don't leak memory */ + free_opts(1); + exit(status); +} + static void generic_opt_check(int command, int options) { -- cgit v1.2.3