diff options
Diffstat (limited to 'networking/tc.c')
-rw-r--r-- | networking/tc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/networking/tc.c b/networking/tc.c index 2e2473a70..9b3245546 100644 --- a/networking/tc.c +++ b/networking/tc.c | |||
@@ -43,17 +43,15 @@ struct globals { | |||
43 | __u32 filter_proto; | 43 | __u32 filter_proto; |
44 | } FIX_ALIASING; | 44 | } FIX_ALIASING; |
45 | #define G (*(struct globals*)&bb_common_bufsiz1) | 45 | #define G (*(struct globals*)&bb_common_bufsiz1) |
46 | struct BUG_G_too_big { | ||
47 | char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; | ||
48 | }; | ||
46 | #define filter_ifindex (G.filter_ifindex) | 49 | #define filter_ifindex (G.filter_ifindex) |
47 | #define filter_qdisc (G.filter_qdisc) | 50 | #define filter_qdisc (G.filter_qdisc) |
48 | #define filter_parent (G.filter_parent) | 51 | #define filter_parent (G.filter_parent) |
49 | #define filter_prio (G.filter_prio) | 52 | #define filter_prio (G.filter_prio) |
50 | #define filter_proto (G.filter_proto) | 53 | #define filter_proto (G.filter_proto) |
51 | 54 | #define INIT_G() do { } while (0) | |
52 | void BUG_tc_globals_too_big(void); | ||
53 | #define INIT_G() do { \ | ||
54 | if (sizeof(G) > COMMON_BUFSIZE) \ | ||
55 | BUG_tc_globals_too_big(); \ | ||
56 | } while (0) | ||
57 | 55 | ||
58 | /* Allocates a buffer containing the name of a class id. | 56 | /* Allocates a buffer containing the name of a class id. |
59 | * The caller must free the returned memory. */ | 57 | * The caller must free the returned memory. */ |