aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
Diffstat (limited to 'findutils')
-rw-r--r--findutils/find.c4
-rw-r--r--findutils/grep.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/findutils/find.c b/findutils/find.c
index bd7ccc323..5bd753536 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -423,9 +423,7 @@ struct globals {
} FIX_ALIASING;
#define G (*(struct globals*)&bb_common_bufsiz1)
#define INIT_G() do { \
- struct G_sizecheck { \
- char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \
- }; \
+ BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \
/* we have to zero it out because of NOEXEC */ \
memset(&G, 0, sizeof(G)); \
IF_FEATURE_FIND_MAXDEPTH(G.minmaxdepth[1] = INT_MAX;) \
diff --git a/findutils/grep.c b/findutils/grep.c
index b9621384e..10b69275a 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -203,9 +203,7 @@ struct globals {
} FIX_ALIASING;
#define G (*(struct globals*)&bb_common_bufsiz1)
#define INIT_G() do { \
- struct G_sizecheck { \
- char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \
- }; \
+ BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \
} while (0)
#define max_matches (G.max_matches )
#if !ENABLE_EXTRA_COMPAT