'qemuDomainStorageAlias' always returns non-NULL pointer if it gets a
non-NULL string on input. Remove unneeded checks from callers.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
backendstoragealias = qemuBlockStorageSourceGetStorageNodename(n);
} else {
/* alias may be NULL if the VM is not running */
- if (disk->info.alias &&
- !(alias = qemuDomainStorageAlias(disk->info.alias, n->id)))
- return -1;
+ if (disk->info.alias)
+ alias = qemuDomainStorageAlias(disk->info.alias, n->id);
/* for 'sd' disks we won't be displaying stats for the backing chain
* as we don't update the stats correctly */
g_autofree char *devicename = NULL;
virJSONValue *backing;
- if (dev_name &&
- !(devicename = qemuDomainStorageAlias(dev_name, depth)))
- return -1;
+ if (dev_name)
+ devicename = qemuDomainStorageAlias(dev_name, depth);
qdevname = virJSONValueObjectGetString(dev, "qdev");
nodename = virJSONValueObjectGetString(dev, "node-name");