*: add optimization barrier to all "G trick" locations
[oweals/busybox.git] / shell / hush.c
index d9ef2390e4d9407beac14210544e47da20f723e1..b44f35bdd9f63c391e7257c4ccbcd6c5e87389c6 100644 (file)
@@ -460,6 +460,9 @@ enum { run_list_level = 0 };
 #endif
 #define charmap          (G.charmap         )
 #define user_input_buf   (G.user_input_buf  )
+#define INIT_G() do { \
+       SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
+} while (0)
 
 
 #define B_CHUNK  100
@@ -3778,7 +3781,7 @@ int hush_main(int argc, char **argv)
        char **e;
        struct variable *cur_var;
 
-       PTR_TO_GLOBALS = xzalloc(sizeof(G));
+       INIT_G();
 
        /* Deal with HUSH_VERSION */
        shell_ver = const_shell_ver; /* copying struct here */