mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +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()))
|
userdir = virGetUserConfigDirectory();
|
||||||
return -1;
|
|
||||||
|
|
||||||
*path = g_strdup_printf("%s/auth.conf", userdir);
|
*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);
|
path = g_strdup_printf("%s/libvirt/%s", SYSCONFDIR, name);
|
||||||
} else {
|
} else {
|
||||||
g_autofree char *userdir = virGetUserConfigDirectory();
|
g_autofree char *userdir = virGetUserConfigDirectory();
|
||||||
if (!userdir)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
path = g_strdup_printf("%s/%s", userdir, name);
|
path = g_strdup_printf("%s/%s", userdir, name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user