summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-08-06 20:15:09 +0200
committerThomas Haller <thaller@redhat.com>2021-08-06 22:00:34 +0200
commitcdb958b4e032a723b0c69d2ed640d8c3c3d44ac9 (patch)
treef2e2cdf0758ffb54695ad5c2f9acbb9960e001d1
parente6583941b1dae8882bb3a5ad28b17584f874a4d1 (diff)
downloadNetworkManager-cdb958b4e032a723b0c69d2ed640d8c3c3d44ac9.tar.gz
std-aux: add XXX() macro
-rw-r--r--src/libnm-std-aux/nm-std-aux.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libnm-std-aux/nm-std-aux.h b/src/libnm-std-aux/nm-std-aux.h
index 2747338576..fe4ff520ad 100644
--- a/src/libnm-std-aux/nm-std-aux.h
+++ b/src/libnm-std-aux/nm-std-aux.h
@@ -209,6 +209,13 @@ typedef uint64_t _nm_bitwise nm_be64_t;
} while (0)
#endif
+/* This is similar nm_assert_not_reached(), but it's not supposed to be used only during
+ * development. Like _XXX_ comments, they can be used as a marker that something still
+ * needs to be done. */
+#define XXX(msg) \
+ nm_assert(!"X" \
+ "XX error: " msg "")
+
#define nm_assert_unreachable_val(val) \
({ \
nm_assert_not_reached(); \