From d884051d7dfa51ebe1a37e343af516b1bba6943d Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 1 Aug 2007 15:19:15 +0000 Subject: Make @msg argument a const char *, just like printf(). Signed-off-by: Jan Engelhardt --- include/xtables.h | 2 +- ip6tables.c | 2 +- iptables-xml.c | 2 +- iptables.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/xtables.h b/include/xtables.h index 72e6ae22..3ac561f5 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -224,7 +224,7 @@ enum exittype { extern void exit_printhelp() __attribute__((noreturn)); extern void exit_tryhelp(int) __attribute__((noreturn)); int check_inverse(const char option[], int *invert, int *optind, int argc); -void exit_error(enum exittype, char *, ...)__attribute__((noreturn, +void exit_error(enum exittype, const char *, ...)__attribute__((noreturn, format(printf,2,3))); extern const char *program_name, *program_version; diff --git a/ip6tables.c b/ip6tables.c index 0f96981e..aeebed4c 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -268,7 +268,7 @@ static void free_opts(int reset_offset) } void -exit_error(enum exittype status, char *msg, ...) +exit_error(enum exittype status, const char *msg, ...) { va_list args; diff --git a/iptables-xml.c b/iptables-xml.c index 71d52885..1bb2e203 100644 --- a/iptables-xml.c +++ b/iptables-xml.c @@ -29,7 +29,7 @@ const char *program_version; #ifndef IPTABLES_MULTI int line = 0; -void exit_error(enum exittype status, char *msg, ...) +void exit_error(enum exittype status, const char *msg, ...) { va_list args; diff --git a/iptables.c b/iptables.c index 78ac13c3..f77a6f08 100644 --- a/iptables.c +++ b/iptables.c @@ -348,7 +348,7 @@ static void free_opts(int reset_offset) } void -exit_error(enum exittype status, char *msg, ...) +exit_error(enum exittype status, const char *msg, ...) { va_list args; -- cgit v1.2.3