mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
locking: Don't check the output of virGetUserConfigDirectory()
virGetUserConfigDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9dbbf056a8
commit
09e993a110
@ -43,16 +43,12 @@ virLockDaemonConfigFilePath(bool privileged, char **configfile)
|
|||||||
} else {
|
} else {
|
||||||
g_autofree char *configdir = NULL;
|
g_autofree char *configdir = NULL;
|
||||||
|
|
||||||
if (!(configdir = virGetUserConfigDirectory()))
|
configdir = virGetUserConfigDirectory();
|
||||||
goto error;
|
|
||||||
|
|
||||||
*configfile = g_strdup_printf("%s/virtlockd.conf", configdir);
|
*configfile = g_strdup_printf("%s/virtlockd.conf", configdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user