summaryrefslogtreecommitdiff
path: root/networking/nc_bloaty.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-02-27 18:41:59 +0000
committerDenis Vlasenko2008-02-27 18:41:59 +0000
commit574f2f43948bb21d6e4187936ba5a5afccba25f6 (patch)
tree0b39aca564149e5ad30b3cc791228655ff1b1827 /networking/nc_bloaty.c
parentfe66a0eca1bfeae0abc0fc1e7d3709f271e05e82 (diff)
downloadbusybox-574f2f43948bb21d6e4187936ba5a5afccba25f6.zip
busybox-574f2f43948bb21d6e4187936ba5a5afccba25f6.tar.gz
*: 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 dd62e5d..cd01478 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -97,7 +97,6 @@ struct globals {
};
#define G (*ptr_to_globals)
-
#define wrote_out (G.wrote_out )
#define wrote_net (G.wrote_net )
#define ouraddr (G.ouraddr )
@@ -115,6 +114,10 @@ struct globals {
#else
#define o_interval 0
#endif
+#define INIT_G() do { \
+ SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
+} while (0)
+
/* Must match getopt32 call! */
enum {
@@ -678,9 +681,7 @@ int nc_main(int argc, char **argv)
int x;
unsigned o_lport = 0;
- /* I was in this barbershop quartet in Skokie IL ... */
- /* round up the usual suspects, i.e. malloc up all the stuff we need */
- PTR_TO_GLOBALS = xzalloc(sizeof(G));
+ INIT_G();
/* catch a signal or two for cleanup */
bb_signals(0