On Thu, Dec 19, 2019 at 11:04:12AM +0100, Fabiano Fidêncio wrote:
virGetUserConfigDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- src/util/virauth.c | 3 +-- src/util/virconf.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/util/virconf.c b/src/util/virconf.c index dce84cabb7..cd18ea61e6 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -1507,8 +1507,6 @@ virConfLoadConfigPath(const char *name) path = g_strdup_printf("%s/libvirt/%s", SYSCONFDIR, name); } else { char *userdir = virGetUserConfigDirectory(); - if (!userdir) - return NULL;
Missed g_autofree opportunity
path = g_strdup_printf("%s/%s", userdir, name); VIR_FREE(userdir);
Whether you squash it in or not: Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list