net: const'ify array
authorRobert Swiecki <robert@swiecki.net>
Fri, 7 Jul 2017 10:13:24 +0000 (12:13 +0200)
committerRobert Swiecki <robert@swiecki.net>
Fri, 7 Jul 2017 10:13:24 +0000 (12:13 +0200)
net.c

diff --git a/net.c b/net.c
index 4f96cbd2c07ce82513704feedf3a5e19a1a5ec25..d3963b0373f2a784201e1bbd518617b429ccaddb 100644 (file)
--- a/net.c
+++ b/net.c
@@ -133,10 +133,9 @@ bool netInitNsFromParent(struct nsjconf_t *nsjconf, int pid)
        char pid_str[256];
        snprintf(pid_str, sizeof(pid_str), "%d", pid);
 
-       const char *argv[] =
-           { "/sbin/ip", "link", "add", "link", (char *)nsjconf->iface_vs, "name", IFACE_NAME,
-               "netns",
-               pid_str, "type", "macvlan", "mode", "bridge", NULL
+       const char *const argv[] = {
+               "/sbin/ip", "link", "add", "link", (char *)nsjconf->iface_vs, "name", IFACE_NAME,
+               "netns", pid_str, "type", "macvlan", "mode", "bridge", NULL
        };
        if (subprocSystem(argv, environ) != 0) {
                LOG_E("Couldn't create MACVTAP interface for '%s'", nsjconf->iface_vs);