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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since the function doesn't alter the passed buffer, make it const.

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

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);
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux