From: Christian Brauner Date: Mon, 29 May 2017 12:30:04 +0000 (+0200) Subject: confile: config_string_item() X-Git-Tag: lxc-1.0.11~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6723fac865c8c31abca9d333868fc89a6a0e6c40;p=thirdparty%2Flxc.git confile: config_string_item() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 70821c3f6..2554fddd0 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -298,7 +298,7 @@ static int config_string_item(char **conf_item, const char *value) { char *new_value; - if (!value || strlen(value) == 0) { + if (config_value_empty(value)) { free(*conf_item); *conf_item = NULL; return 0; @@ -306,7 +306,7 @@ static int config_string_item(char **conf_item, const char *value) new_value = strdup(value); if (!new_value) { - SYSERROR("failed to strdup '%s': %m", value); + SYSERROR("failed to duplicate string \"%s\"", value); return -1; }