Cleanup: add `#include <stdbool.h>` whenever `bool` type is used
[babeltrace.git] / src / lib / assert-pre.h
index a470a63b15e86c04feb924dfddbf3ce7189ef340..0b85d861f695244c8450f8644dadf4dc00701531 100644 (file)
@@ -39,6 +39,7 @@
 # error Include "lib/logging.h" before this header.
 #endif
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <inttypes.h>
 #include "common/macros.h"
@@ -86,7 +87,7 @@
  * code), use BT_ASSERT_POST().
  *
  * To assert that an internal postcondition is satisfied, use
- * BT_ASSERT().
+ * BT_ASSERT() or BT_ASSERT_DBG().
  */
 #define BT_ASSERT_PRE(_cond, _fmt, ...)                                \
        do {                                                            \
  * is not `NULL`.
  */
 #define BT_ASSERT_PRE_NON_NULL(_obj, _obj_name)                                \
-       BT_ASSERT_PRE((_obj) != NULL, "%s is NULL: ", _obj_name)
+       BT_ASSERT_PRE((_obj), "%s is NULL: ", _obj_name)
 
 /*
  * Asserts that a given index `_index` is less than a given length
This page took 0.023311 seconds and 4 git commands to generate.