From 1b34d4f0b1d634eb8219d52c693fa80b99ed1bfa Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 30 Sep 2009 02:39:57 +0200 Subject: 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 --- networking/telnet.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'networking/telnet.c') diff --git a/networking/telnet.c b/networking/telnet.c index cc994250c..77e17479d 100644 --- a/networking/telnet.c +++ b/networking/telnet.c @@ -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 */ -- cgit v1.2.3