]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables: parameter to add_argv() may be const
authorPhil Sutter <phil@nwl.cc>
Thu, 19 Jul 2018 16:32:07 +0000 (18:32 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 19 Jul 2018 21:11:53 +0000 (23:11 +0200)
Since the function doesn't alter the passed buffer, make it const.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/xtables-restore.c

index f127093d16657b7b29addbd5a41b339e05248920..f93924579fe4f0aed2b687de8f549d5f4eee3a50 100644 (file)
@@ -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);