diff options
author | Toomas Soome <tsoome@me.com> | 2022-01-26 23:44:14 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-05-18 18:31:03 +0300 |
commit | 6328d71e9dd97ed4dfdf9425b5dc7b9deb6f579a (patch) | |
tree | ad1b674d7d8ede447f3d8cc77043af88c0e7dff6 /usr/src/boot | |
parent | b602cbcd64fbbebf696bd7c8e03367bdfa19805d (diff) | |
download | illumos-gate-6328d71e9dd97ed4dfdf9425b5dc7b9deb6f579a.tar.gz |
14454 sys/debug.h: CTASSERT should use _Static_assert
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
Approved by: Dan McDonald <danmcd@mnx.io>
Diffstat (limited to 'usr/src/boot')
-rw-r--r-- | usr/src/boot/common/bootstrap.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/usr/src/boot/common/bootstrap.h b/usr/src/boot/common/bootstrap.h index 689905ae68..f176973897 100644 --- a/usr/src/boot/common/bootstrap.h +++ b/usr/src/boot/common/bootstrap.h @@ -409,10 +409,6 @@ int nvstore_set_var_from_string(void *, const char *, const char *, const char *); int nvstore_unset_var(void *, const char *); -#ifndef CTASSERT /* Allow lint to override */ -#define CTASSERT(x) _CTASSERT(x, __LINE__) -#define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] -#endif +#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed") #endif /* !_BOOTSTRAP_H_ */ |