* tools/virsh.c (cmdPoolDiscoverSources): Always initialize srcSpec.
Otherwise, clang would report that srcSpec could be used uninitialized
in the call to virConnectFindStoragePoolSources.
static int
cmdPoolDiscoverSources(vshControl * ctl, const vshCmd * cmd ATTRIBUTE_UNUSED)
{
- char *type, *srcSpec, *srcSpecFile, *srcList;
+ char *type, *srcSpecFile, *srcList;
+ char *srcSpec = NULL;
int found;
type = vshCommandOptString(cmd, "type", &found);
if (!found)
return FALSE;
srcSpecFile = vshCommandOptString(cmd, "srcSpec", &found);
- if (!found) {
+ if (!found)
srcSpecFile = NULL;
- srcSpec = NULL;
- }
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE;