]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: config_string_item()
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 29 May 2017 12:30:04 +0000 (14:30 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 15 Aug 2017 21:32:11 +0000 (17:32 -0400)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index 70821c3f6ebfaffd6e9fa4effdf92237f7b0db8c..2554fddd0f0e23ae0b0230a3da14588fd834d6f1 100644 (file)
@@ -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;
        }