mirror of https://github.com/yshui/picom.git
utils: BUG_ON was not doing what the comment says
It should abort if the expr is true, but is doing the other way around Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
974698764b
commit
3bac1d8845
|
@ -49,9 +49,9 @@ safe_isnan(double a) {
|
||||||
#define BUG_ON(expr) \
|
#define BUG_ON(expr) \
|
||||||
do { \
|
do { \
|
||||||
bool __bug_on_tmp = (expr); \
|
bool __bug_on_tmp = (expr); \
|
||||||
assert(__bug_on_tmp && "original expr: " #expr); \
|
assert(!__bug_on_tmp && "Original expr: " #expr); \
|
||||||
if (!__bug_on_tmp) { \
|
if (__bug_on_tmp) { \
|
||||||
fprintf(stderr, "BUG_ON: check \"%s\" failed \n", #expr); \
|
fprintf(stderr, "BUG_ON: \"%s\"\n", #expr); \
|
||||||
abort(); \
|
abort(); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
Loading…
Reference in New Issue