mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: Use g_assert* to implement BUG() and BUG_ON() assertions
This commit is contained in:
@@ -44,14 +44,8 @@
|
|||||||
#define fp_warn g_warning
|
#define fp_warn g_warning
|
||||||
#define fp_err g_error
|
#define fp_err g_error
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#define BUG_ON(condition) g_assert(condition)
|
||||||
#define BUG_ON(condition) \
|
#define BUG() g_assert_not_reached()
|
||||||
if ((condition)) fp_err("BUG at %s:%d", __FILE__, __LINE__)
|
|
||||||
#else
|
|
||||||
#define BUG_ON(condition)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BUG() BUG_ON(1)
|
|
||||||
|
|
||||||
enum fp_dev_state {
|
enum fp_dev_state {
|
||||||
DEV_STATE_INITIAL = 0,
|
DEV_STATE_INITIAL = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user