diff options
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c index d9ef2390e..b44f35bdd 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -460,6 +460,9 @@ enum { run_list_level = 0 }; | |||
460 | #endif | 460 | #endif |
461 | #define charmap (G.charmap ) | 461 | #define charmap (G.charmap ) |
462 | #define user_input_buf (G.user_input_buf ) | 462 | #define user_input_buf (G.user_input_buf ) |
463 | #define INIT_G() do { \ | ||
464 | SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ | ||
465 | } while (0) | ||
463 | 466 | ||
464 | 467 | ||
465 | #define B_CHUNK 100 | 468 | #define B_CHUNK 100 |
@@ -3778,7 +3781,7 @@ int hush_main(int argc, char **argv) | |||
3778 | char **e; | 3781 | char **e; |
3779 | struct variable *cur_var; | 3782 | struct variable *cur_var; |
3780 | 3783 | ||
3781 | PTR_TO_GLOBALS = xzalloc(sizeof(G)); | 3784 | INIT_G(); |
3782 | 3785 | ||
3783 | /* Deal with HUSH_VERSION */ | 3786 | /* Deal with HUSH_VERSION */ |
3784 | shell_ver = const_shell_ver; /* copying struct here */ | 3787 | shell_ver = const_shell_ver; /* copying struct here */ |