confile: config_string_item()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2017-05-29 14:30:04 +02:00
parent fe8d7be755
commit e70b9db539
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -340,7 +340,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;
@ -348,7 +348,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;
}