From afe54df8435080befa04914efbf4f366025a6095 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Thu, 26 Jan 2017 10:32:31 -0800 Subject: [PATCH] Eliminate the 'global' var_table_t variable in env.cpp This can always be trivially found from 'global_env' --- src/env.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/env.cpp b/src/env.cpp index d05e33c05..ef98c5352 100644 --- a/src/env.cpp +++ b/src/env.cpp @@ -102,9 +102,6 @@ static env_universal_t *s_universal_variables = NULL; /// Getter for universal variables. static env_universal_t *uvars() { return s_universal_variables; } -/// Table for global variables. -static var_table_t *global; - // Helper class for storing constant strings, without needing to wrap them in a wcstring. // Comparer for const string set. @@ -426,7 +423,6 @@ void env_init(const struct config_paths_t *paths /* or NULL */) { top = new env_node_t; global_env = top; - global = &top->env; // Now the environment variable handling is set up, the next step is to insert valid data. @@ -950,7 +946,7 @@ void env_push(bool new_scope) { } void env_pop() { - if (&top->env != global) { + if (top != global_env) { int i; const wchar_t *locale_changed = NULL; env_node_t *killme = top;