Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/common/include/linux drm: Make BUILD_BUG_ON...



details:   https://anonhg.NetBSD.org/src/rev/28d03f3f4e32
branches:  trunk
changeset: 1028522:28d03f3f4e32
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:14:34 2021 +0000

description:
drm: Make BUILD_BUG_ON_ZERO do something.

diffstat:

 sys/external/bsd/common/include/linux/build_bug.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 697fb2986dd5 -r 28d03f3f4e32 sys/external/bsd/common/include/linux/build_bug.h
--- a/sys/external/bsd/common/include/linux/build_bug.h Sun Dec 19 11:14:26 2021 +0000
+++ b/sys/external/bsd/common/include/linux/build_bug.h Sun Dec 19 11:14:34 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: build_bug.h,v 1.3 2021/12/19 11:14:26 riastradh Exp $  */
+/*     $NetBSD: build_bug.h,v 1.4 2021/12/19 11:14:34 riastradh Exp $  */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -41,6 +41,6 @@
 #define        BUILD_BUG()                     do {} while (0)
 #define        BUILD_BUG_ON_MSG(EXPR,MSG)      BUILD_BUG_ON(EXPR)
 #define        BUILD_BUG_ON_INVALID(EXPR)      ((void)sizeof((long)(EXPR)))
-#define        BUILD_BUG_ON_ZERO(EXPR)         0
+#define        BUILD_BUG_ON_ZERO(EXPR)         ((int)(0*sizeof(int[(EXPR) ? -1 : 1])))
 
 #endif /* _LINUX_BUILD_BUG_H_ */



Home | Main Index | Thread Index | Old Index