aboutsummaryrefslogtreecommitdiff
path: root/networking/ftpgetput.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-13 14:50:20 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-13 14:50:20 +0200
commitab3964db4e75e34f6f9347406c5fd2bced04f2dd (patch)
tree92113e4a008338ed8534858db97d3a5e09dc210b /networking/ftpgetput.c
parentf7ad927c2059ef9cd1cd6befeb43f26b92f6369f (diff)
downloadbusybox-w32-ab3964db4e75e34f6f9347406c5fd2bced04f2dd.tar.gz
busybox-w32-ab3964db4e75e34f6f9347406c5fd2bced04f2dd.tar.bz2
busybox-w32-ab3964db4e75e34f6f9347406c5fd2bced04f2dd.zip
libbb: introduce kernel-style BUILD_BUG_ON()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ftpgetput.c')
-rw-r--r--networking/ftpgetput.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 8283366cc..b398bc874 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -62,9 +62,6 @@ struct globals {
62} FIX_ALIASING; 62} FIX_ALIASING;
63#define G (*(struct globals*)&bb_common_bufsiz1) 63#define G (*(struct globals*)&bb_common_bufsiz1)
64enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) }; 64enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) };
65struct BUG_G_too_big {
66 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
67};
68#define user (G.user ) 65#define user (G.user )
69#define password (G.password ) 66#define password (G.password )
70#define lsa (G.lsa ) 67#define lsa (G.lsa )
@@ -72,7 +69,9 @@ struct BUG_G_too_big {
72#define verbose_flag (G.verbose_flag ) 69#define verbose_flag (G.verbose_flag )
73#define do_continue (G.do_continue ) 70#define do_continue (G.do_continue )
74#define buf (G.buf ) 71#define buf (G.buf )
75#define INIT_G() do { } while (0) 72#define INIT_G() do { \
73 BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \
74} while (0)
76 75
77 76
78static void ftp_die(const char *msg) NORETURN; 77static void ftp_die(const char *msg) NORETURN;