From: Guus Sliepen Date: Tue, 16 Nov 2010 15:45:36 +0000 (+0100) Subject: Fix variable length array declaration. X-Git-Tag: import-tinc-1.1~542^2~1 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=e764ff7be9949c91865aff72844357e76ae6dd78;p=meshlink 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);