summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-11-19 22:12:55 +0100
committerAlejandro Colomar <alx.manpages@gmail.com>2021-11-20 13:22:21 +0100
commitfddfcddc13dc1f4281089cc3a3580df01c73dab7 (patch)
tree3d8a69e0820c44508f3e376133c06a340021ccb3
parent8519d798017cd1aec6ac30945d4c19a274e4c861 (diff)
linux/compiler.h: Implement __must_be_array() in terms of __must_be()
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--include/linux/compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 3d5af56337bd..64d99335874d 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -255,7 +255,7 @@ static inline void *offset_to_ptr(const int *off)
#endif /* __ASSEMBLY__ */
/* &a[0] degrades to a pointer: a different type from an array */
-#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
+#define __must_be_array(a) __must_be(!__same_type((a), &(a)[0]))
/*
* This is needed in functions which generate the stack canary, see