Skip to content

Commit 88c3fcc

Browse files
committed
Force implicit conversion to boolean.
This unbreaks the use of assertions within C++ code.
1 parent b22cae9 commit 88c3fcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/assert.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ static __inline void __assert_enabled(const char *__func, const char *__file,
5454
#define assert(expression) __assert_disabled()
5555
#else
5656
#define assert(expression) \
57-
__assert_enabled(__func__, __FILE__, __LINE__, expression, #expression)
57+
__assert_enabled(__func__, __FILE__, __LINE__, !!(expression), #expression)
5858
#endif

0 commit comments

Comments
 (0)