mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
util: 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
09ae41b88c
commit
aa4a0264bf
@ -66,8 +66,7 @@ virAuthGetConfigFilePathURI(virURIPtr uri,
|
||||
}
|
||||
}
|
||||
|
||||
if (!(userdir = virGetUserConfigDirectory()))
|
||||
return -1;
|
||||
userdir = virGetUserConfigDirectory();
|
||||
|
||||
*path = g_strdup_printf("%s/auth.conf", userdir);
|
||||
|
||||
|
@ -1507,8 +1507,6 @@ virConfLoadConfigPath(const char *name)
|
||||
path = g_strdup_printf("%s/libvirt/%s", SYSCONFDIR, name);
|
||||
} else {
|
||||
g_autofree char *userdir = virGetUserConfigDirectory();
|
||||
if (!userdir)
|
||||
return NULL;
|
||||
|
||||
path = g_strdup_printf("%s/%s", userdir, name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user