aboutsummaryrefslogtreecommitdiff
path: root/networking/nc_bloaty.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-27 18:41:59 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-27 18:41:59 +0000
commit574f2f43948bb21d6e4187936ba5a5afccba25f6 (patch)
tree0b39aca564149e5ad30b3cc791228655ff1b1827 /networking/nc_bloaty.c
parentfe66a0eca1bfeae0abc0fc1e7d3709f271e05e82 (diff)
downloadbusybox-w32-574f2f43948bb21d6e4187936ba5a5afccba25f6.tar.gz
busybox-w32-574f2f43948bb21d6e4187936ba5a5afccba25f6.tar.bz2
busybox-w32-574f2f43948bb21d6e4187936ba5a5afccba25f6.zip
*: add optimization barrier to all "G trick" locations
Diffstat (limited to 'networking/nc_bloaty.c')
-rw-r--r--networking/nc_bloaty.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c
index dd62e5df7..cd014781b 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -97,7 +97,6 @@ struct globals {
97}; 97};
98 98
99#define G (*ptr_to_globals) 99#define G (*ptr_to_globals)
100
101#define wrote_out (G.wrote_out ) 100#define wrote_out (G.wrote_out )
102#define wrote_net (G.wrote_net ) 101#define wrote_net (G.wrote_net )
103#define ouraddr (G.ouraddr ) 102#define ouraddr (G.ouraddr )
@@ -115,6 +114,10 @@ struct globals {
115#else 114#else
116#define o_interval 0 115#define o_interval 0
117#endif 116#endif
117#define INIT_G() do { \
118 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
119} while (0)
120
118 121
119/* Must match getopt32 call! */ 122/* Must match getopt32 call! */
120enum { 123enum {
@@ -678,9 +681,7 @@ int nc_main(int argc, char **argv)
678 int x; 681 int x;
679 unsigned o_lport = 0; 682 unsigned o_lport = 0;
680 683
681 /* I was in this barbershop quartet in Skokie IL ... */ 684 INIT_G();
682 /* round up the usual suspects, i.e. malloc up all the stuff we need */
683 PTR_TO_GLOBALS = xzalloc(sizeof(G));
684 685
685 /* catch a signal or two for cleanup */ 686 /* catch a signal or two for cleanup */
686 bb_signals(0 687 bb_signals(0