diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-30 02:39:57 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-30 02:39:57 +0200 |
commit | 1b34d4f0b1d634eb8219d52c693fa80b99ed1bfa (patch) | |
tree | 1fa51b9580409d4fa8de86bf8c9b2ab083caf10d /coreutils/ls.c | |
parent | c34c033c4256f88e759c5f7a59526b4397852a82 (diff) | |
download | busybox-w32-1b34d4f0b1d634eb8219d52c693fa80b99ed1bfa.tar.gz busybox-w32-1b34d4f0b1d634eb8219d52c693fa80b99ed1bfa.tar.bz2 busybox-w32-1b34d4f0b1d634eb8219d52c693fa80b99ed1bfa.zip |
find: add zeroing of G.xxx; ftpd - remove extraneous zeroing of G.xxx
Brought "G trick" to the same shape in a few more places.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r-- | coreutils/ls.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index 827b35089..19d38049c 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -264,15 +264,15 @@ struct globals { | |||
264 | }; | 264 | }; |
265 | #define G (*(struct globals*)&bb_common_bufsiz1) | 265 | #define G (*(struct globals*)&bb_common_bufsiz1) |
266 | #if ENABLE_FEATURE_LS_COLOR | 266 | #if ENABLE_FEATURE_LS_COLOR |
267 | #define show_color (G.show_color ) | 267 | # define show_color (G.show_color ) |
268 | #else | 268 | #else |
269 | enum { show_color = 0 }; | 269 | enum { show_color = 0 }; |
270 | #endif | 270 | #endif |
271 | #define exit_code (G.exit_code ) | 271 | #define exit_code (G.exit_code ) |
272 | #define all_fmt (G.all_fmt ) | 272 | #define all_fmt (G.all_fmt ) |
273 | #if ENABLE_FEATURE_AUTOWIDTH | 273 | #if ENABLE_FEATURE_AUTOWIDTH |
274 | #define tabstops (G.tabstops ) | 274 | # define tabstops (G.tabstops ) |
275 | #define terminal_width (G.terminal_width) | 275 | # define terminal_width (G.terminal_width) |
276 | #else | 276 | #else |
277 | enum { | 277 | enum { |
278 | tabstops = COLUMN_GAP, | 278 | tabstops = COLUMN_GAP, |
@@ -280,8 +280,8 @@ enum { | |||
280 | }; | 280 | }; |
281 | #endif | 281 | #endif |
282 | #define current_time_t (G.current_time_t) | 282 | #define current_time_t (G.current_time_t) |
283 | /* memset: we have to zero it out because of NOEXEC */ | ||
284 | #define INIT_G() do { \ | 283 | #define INIT_G() do { \ |
284 | /* we have to zero it out because of NOEXEC */ \ | ||
285 | memset(&G, 0, sizeof(G)); \ | 285 | memset(&G, 0, sizeof(G)); \ |
286 | IF_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \ | 286 | IF_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \ |
287 | IF_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \ | 287 | IF_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \ |