mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 07:13:42 +00:00
confile: config_string_item()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
fe8d7be755
commit
e70b9db539
@ -340,7 +340,7 @@ static int config_string_item(char **conf_item, const char *value)
|
|||||||
{
|
{
|
||||||
char *new_value;
|
char *new_value;
|
||||||
|
|
||||||
if (!value || strlen(value) == 0) {
|
if (config_value_empty(value)) {
|
||||||
free(*conf_item);
|
free(*conf_item);
|
||||||
*conf_item = NULL;
|
*conf_item = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
@ -348,7 +348,7 @@ static int config_string_item(char **conf_item, const char *value)
|
|||||||
|
|
||||||
new_value = strdup(value);
|
new_value = strdup(value);
|
||||||
if (!new_value) {
|
if (!new_value) {
|
||||||
SYSERROR("failed to strdup '%s': %m", value);
|
SYSERROR("failed to duplicate string \"%s\"", value);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user