From fe8d7be755e69b36fadbe00653db98598e996622 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Mon, 29 May 2017 14:28:34 +0200 Subject: [PATCH] confile: add config_value_empty() Signed-off-by: Christian Brauner --- src/lxc/confile.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 4114e9fff..1561a73c9 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -328,6 +328,14 @@ int lxc_listconfigs(char *retv, int inlen) return fulllen; } +static inline bool config_value_empty(const char *value) +{ + if (value && strlen(value) > 0) + return false; + + return true; +} + static int config_string_item(char **conf_item, const char *value) { char *new_value;