knownhosts = g_strdup(knownHostsPath);
} else {
confdir = virGetUserConfigDirectory();
- if (confdir) {
- virBufferAsprintf(&buf, "%s/known_hosts", confdir);
- if (!(knownhosts = virBufferContentAndReset(&buf)))
- goto no_memory;
- }
+ virBufferAsprintf(&buf, "%s/known_hosts", confdir);
+ if (!(knownhosts = virBufferContentAndReset(&buf)))
+ goto no_memory;
}
if (privkeyPath) {
knownhosts = g_strdup(knownHostsPath);
} else {
confdir = virGetUserConfigDirectory();
- if (confdir)
- knownhosts = g_strdup_printf("%s/known_hosts", confdir);
+ knownhosts = g_strdup_printf("%s/known_hosts", confdir);
}
if (privkeyPath) {