From: Phil Sutter Date: Thu, 19 Jul 2018 16:32:07 +0000 (+0200) Subject: xtables: parameter to add_argv() may be const X-Git-Tag: v1.8.1~121 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de8574ac79c83d4575e2613472c1978a5154bdb7;p=thirdparty%2Fiptables.git xtables: parameter to add_argv() may be const Since the function doesn't alter the passed buffer, make it const. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c index f127093d..f9392457 100644 --- a/iptables/xtables-restore.c +++ b/iptables/xtables-restore.c @@ -78,7 +78,7 @@ static int newargc; /* function adding one argument to newargv, updating newargc * returns true if argument added, false otherwise */ -static int add_argv(char *what) { +static int add_argv(const char *what) { DEBUGP("add_argv: %s\n", what); if (what && newargc + 1 < ARRAY_SIZE(newargv)) { newargv[newargc] = strdup(what);