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 /networking/telnet.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 'networking/telnet.c')
-rw-r--r-- | networking/telnet.c | 7 |
1 files changed, 3 insertions, 4 deletions
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 { | |||
77 | struct termios termios_raw; | 77 | struct termios termios_raw; |
78 | }; | 78 | }; |
79 | #define G (*(struct globals*)&bb_common_bufsiz1) | 79 | #define G (*(struct globals*)&bb_common_bufsiz1) |
80 | void BUG_telnet_globals_too_big(void); | ||
81 | #define INIT_G() do { \ | 80 | #define INIT_G() do { \ |
82 | if (sizeof(G) > COMMON_BUFSIZE) \ | 81 | struct G_sizecheck { \ |
83 | BUG_telnet_globals_too_big(); \ | 82 | char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \ |
84 | /* memset(&G, 0, sizeof G); - already is */ \ | 83 | }; \ |
85 | } while (0) | 84 | } while (0) |
86 | 85 | ||
87 | /* Function prototypes */ | 86 | /* Function prototypes */ |