aboutsummaryrefslogtreecommitdiff
path: root/networking/tftp.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/tftp.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/tftp.c')
-rw-r--r--networking/tftp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/networking/tftp.c b/networking/tftp.c
index 8ecd7bb6f..ad9308e52 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -129,10 +129,9 @@ struct globals {
129#endif 129#endif
130} FIX_ALIASING; 130} FIX_ALIASING;
131#define G (*(struct globals*)&bb_common_bufsiz1) 131#define G (*(struct globals*)&bb_common_bufsiz1)
132struct BUG_G_too_big { 132#define INIT_G() do { \
133 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; 133 BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \
134}; 134} while (0)
135#define INIT_G() do { } while (0)
136 135
137#define G_error_pkt_reason (G.error_pkt[3]) 136#define G_error_pkt_reason (G.error_pkt[3])
138#define G_error_pkt_str ((char*)(G.error_pkt + 4)) 137#define G_error_pkt_str ((char*)(G.error_pkt + 4))