summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
authorJamal Hadi Salim <hadi@cyberus.ca>2009-02-11 13:05:43 +0100
committerPatrick McHardy <kaber@trash.net>2009-02-11 13:05:43 +0100
commit8b7baebc93989106fd5d26b262d0ce191f8ef7c0 (patch)
tree7f320fe1b60ff07e537149541da0f46316631996 /iptables.c
parent7878483dfaf91adcdb7e8e88c93ded82312af39a (diff)
libxtables: simple aliasing macro for exit_error
Rename xtables_globals exit_error cb to exit_err and introduce a very simple aliasing macro to point to it. convert iptables, ip6tables and iptables_xml to use it. Note iptables_xml does not have to define its own exit_error() since it can use the basic one provided. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/iptables.c b/iptables.c
index e8bed877..fe28e504 100644
--- a/iptables.c
+++ b/iptables.c
@@ -145,12 +145,14 @@ int line = -1;
static struct option *opts = original_opts;
static unsigned int global_option_offset = 0;
+void iptables_exit_error(enum xtables_exittype status, const char *msg, ...) __attribute__((noreturn, format(printf,2,3)));
+
struct xtables_globals iptables_globals = {
.option_offset = 0,
.program_version = IPTABLES_VERSION,
.program_name = "iptables",
.opts = original_opts,
- .exit_error = exit_error,
+ .exit_err = iptables_exit_error,
};
/* Table of legal combinations of commands and options. If any of the
@@ -348,7 +350,7 @@ exit_printhelp(struct iptables_rule_match *matches)
}
void
-exit_error(enum xtables_exittype status, const char *msg, ...)
+iptables_exit_error(enum xtables_exittype status, const char *msg, ...)
{
va_list args;