summaryrefslogtreecommitdiffstats
path: root/ip6tables.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-09-08 16:00:01 +0000
committerPatrick McHardy <kaber@trash.net>2007-09-08 16:00:01 +0000
commit0b63936140032deac44072951451bdf47b54296a (patch)
tree673d928bebe5d6d793a41119899904e1f7d0d79e /ip6tables.c
parent500f483fff529dcd88ec96b9d5054be6cd6363a0 (diff)
Fix more sparse warnings: non-C99 array declaration, incorrect function prototypes
Diffstat (limited to 'ip6tables.c')
-rw-r--r--ip6tables.c44
1 files changed, 22 insertions, 22 deletions
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)
{