diff options
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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))) |