]> git.meshlink.io Git - meshlink/commitdiff
Fix variable length array declaration.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 16 Nov 2010 15:45:36 +0000 (16:45 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 16 Nov 2010 15:45:36 +0000 (16:45 +0100)
src/process.c

index b3054561f106c10d5d57e4e1f779e8ded813720b..0007943ab6332899490ce3732fca5bb483729a77 100644 (file)
@@ -356,7 +356,7 @@ bool detach(void) {
 bool execute_script(const char *name, char **envp) {
 #ifdef HAVE_SYSTEM
        int status, len;
-       char *scriptname, *p;
+       char *scriptname;
        int i;
 
 #ifndef HAVE_MINGW
@@ -397,7 +397,7 @@ bool execute_script(const char *name, char **envp) {
        for(i = 0; envp[i]; i++) {
                char *e = strchr(envp[i], '=');
                if(e) {
-                       p[e - envp[i] + 1];
+                       char p[e - envp[i] + 1];
                        strncpy(p, envp[i], e - envp[i]);
                        p[e - envp[i]] = '\0';
                        putenv(p);