diff mbox series

[iptables,15/17] xtables: Parameter to add_argv() may be const

Message ID 20180719163209.7987-16-phil@nwl.cc
State Accepted
Delegated to: Pablo Neira
Headers show
Series xtables: Implement ebtables-{save,restore} | expand

Commit Message

Phil Sutter July 19, 2018, 4:32 p.m. UTC
Since the function doesn't alter the passed buffer, make it const.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 iptables/xtables-restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c
index f127093d16657..f93924579fe4f 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);