aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-09-13 16:33:27 -0600
committerTom Tromey <tom@tromey.com>2018-09-14 06:49:13 -0600
commit87b240d48512fa30aab8b5963914a9093009fd68 (patch)
tree70e06b8652c653afc6fe76874597ceb7729b5097 /gdb/nat
parentPR23633 testcase fix (diff)
downloadbinutils-gdb-87b240d48512fa30aab8b5963914a9093009fd68.tar.gz
binutils-gdb-87b240d48512fa30aab8b5963914a9093009fd68.tar.bz2
binutils-gdb-87b240d48512fa30aab8b5963914a9093009fd68.zip
Make variable in get_startup_shell non-static
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".
Diffstat (limited to 'gdb/nat')
-rw-r--r--gdb/nat/fork-inferior.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index ea71aad25f7..40cd05a0f8f 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -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;