changeset 1236:a0062a354a80

Fix "Pointer to local array variable returned"
author Chocobo1 <Chocobo1@users.noreply.github.com>
date Tue, 05 Jan 2016 12:25:10 +0800
parents 5b4024eba55b
children 888e3d17e962
files compat.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/compat.c	Mon Jan 04 21:18:17 2016 +0800
+++ b/compat.c	Tue Jan 05 12:25:10 2016 +0800
@@ -235,7 +235,7 @@
 
 static char **initshells() {
 	/* don't touch this list. */
-	const char *okshells[] = { "/bin/sh", "/bin/csh", NULL };
+	static const char *okshells[] = { "/bin/sh", "/bin/csh", NULL };
 	register char **sp, *cp;
 	register FILE *fp;
 	struct stat statb;