*: more BUILD_BUG_ON conversions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -184,10 +184,6 @@ struct globals {
|
||||
}; //FIX_ALIASING; - large code growth
|
||||
enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) };
|
||||
#define G (*(struct globals*)&bb_common_bufsiz1)
|
||||
struct BUG_bad_size {
|
||||
char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
|
||||
char BUG_line_buf_too_small[LINE_BUF_SIZE > 80 ? 1 : -1];
|
||||
};
|
||||
#define top (G.top )
|
||||
#define ntop (G.ntop )
|
||||
#define sort_field (G.sort_field )
|
||||
@@ -204,7 +200,10 @@ struct BUG_bad_size {
|
||||
#define num_cpus (G.num_cpus )
|
||||
#define total_pcpu (G.total_pcpu )
|
||||
#define line_buf (G.line_buf )
|
||||
#define INIT_G() do { } while (0)
|
||||
#define INIT_G() do { \
|
||||
BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \
|
||||
BUILD_BUG_ON(LINE_BUF_SIZE <= 80); \
|
||||
} while (0)
|
||||
|
||||
enum {
|
||||
OPT_d = (1 << 0),
|
||||
|
||||
Reference in New Issue
Block a user