lib: Fix new BUG_ON() implementation again

This time, the macro didn't wrap the condition, resulting in calls
like BUG_ON(size > 100) being expanded to g_assert(!size > 100), when
what we wanted was BUG_ON(!(size > 100)).

See 9cca501650,
ff09456cf5, and egg on my face.
This commit is contained in:
Bastien Nocera 2018-05-25 17:00:40 +02:00
parent 9cca501650
commit 0e351db91a

View file

@ -47,7 +47,7 @@
#define fp_warn g_warning #define fp_warn g_warning
#define fp_err g_error #define fp_err g_error
#define BUG_ON(condition) g_assert(!condition) #define BUG_ON(condition) g_assert(!(condition))
#define BUG() g_assert_not_reached() #define BUG() g_assert_not_reached()
enum fp_dev_state { enum fp_dev_state {