glib-aux: add nm_assert_is_ternary() helper

This commit is contained in:
Thomas Haller
2021-05-20 18:25:41 +02:00
parent 881b42c454
commit dc89f466ff

View File

@@ -18,6 +18,8 @@ typedef enum _nm_packed {
NM_OPTION_BOOL_TRUE = 1,
} NMOptionBool;
#define nm_assert_is_ternary(value) nm_assert(NM_IN_SET((value), -1, 0, 1))
/*****************************************************************************/
static inline gboolean