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>
This commit is contained in:
Denys Vlasenko
2009-09-30 02:39:57 +02:00
parent c34c033c42
commit 1b34d4f0b1
5 changed files with 17 additions and 14 deletions

View File

@@ -77,11 +77,10 @@ struct globals {
struct termios termios_raw;
};
#define G (*(struct globals*)&bb_common_bufsiz1)
void BUG_telnet_globals_too_big(void);
#define INIT_G() do { \
if (sizeof(G) > COMMON_BUFSIZE) \
BUG_telnet_globals_too_big(); \
/* memset(&G, 0, sizeof G); - already is */ \
struct G_sizecheck { \
char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \
}; \
} while (0)
/* Function prototypes */