From: Guus Sliepen Date: Tue, 16 Nov 2010 15:45:36 +0000 (+0100) Subject: Fix variable length array declaration. X-Git-Tag: release-1.0.14~25 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=e764ff7be9949c91865aff72844357e76ae6dd78;p=tinc Fix variable length array declaration. --- diff --git a/src/process.c b/src/process.c index b3054561..0007943a 100644 --- a/src/process.c +++ b/src/process.c @@ -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);