Make variable in get_startup_shell non-static
authorTom Tromey <tom@tromey.com>
Thu, 13 Sep 2018 22:33:27 +0000 (16:33 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 14 Sep 2018 12:49:13 +0000 (06:49 -0600)
I noticed that a variable in get_startup_shell is "static".  However,
I couldn't see any reason it ought to be, so this removes the
"static".

gdb/ChangeLog
2018-09-14  Tom Tromey  <tom@tromey.com>

* nat/fork-inferior.c (get_startup_shell): Remove "static".

gdb/ChangeLog
gdb/nat/fork-inferior.c

index 931842bf9e32b610ae64b4ef84d06742c62441e2..d83f0873902e5597e82ebc24bdaf34d84796af8f 100644 (file)
@@ -1,3 +1,7 @@
+2018-09-14  Tom Tromey  <tom@tromey.com>
+
+       * nat/fork-inferior.c (get_startup_shell): Remove "static".
+
 2018-09-13  Tom Tromey  <tom@tromey.com>
 
        * python/py-inferior.c (infpy_thread_from_thread_handle): Now
index ea71aad25f7cdfe7d7c23626c7bb79da066ee8aa..40cd05a0f8fb7f20c486895d83d8904a699adfdf 100644 (file)
@@ -272,9 +272,7 @@ execv_argv::init_for_shell (const char *exec_file,
 static const char *
 get_startup_shell ()
 {
-  static const char *ret;
-
-  ret = getenv ("SHELL");
+  const char *ret = getenv ("SHELL");
   if (ret == NULL)
     ret = SHELL_FILE;
 
This page took 0.035285 seconds and 4 git commands to generate.