summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index 1b077d0f55..a1c1abb514 100644
--- a/include/util.h
+++ b/include/util.h
@@ -45,6 +45,9 @@ extern "C" {
#define NULL ((void *)0)
#endif
+/* Returns true if string is not null and not empty */
+#define IS_NONEMPTY_STRING(s) ((s) && (s)[0])
+
/**
* Ensure that value `v` is between `min` and `max`.
*