summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 7110265..81ffdb8 100644
--- a/utils.h
+++ b/utils.h
@@ -101,6 +101,13 @@ char *sockaddr_to_str(struct sockaddr_in46 *addr, char *buf, size_t buflen);
int strtou16_strict(const char *str, uint16_t *result);
+static inline bool empty_str(const char *str)
+{
+ if (!str || str[0] == '\0')
+ return true;
+ else
+ return false;
+}
/*
#define _cleanup_(x) __attribute__((cleanup(x)))