All of these have been checked earlier.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
usbsrc->bus, usbsrc->device,
bus, device);
}
- } else if (!vendor && bus) {
+ } else if (bus) {
if (virUSBDeviceFindByBus(bus, device, NULL, mandatory, usb) < 0)
return -1;
}
unsigned long long kbsize = 0;
/* Is there a sublist (vnode)? */
- if (list && list->type == VIR_CONF_LIST) {
+ if (list->type == VIR_CONF_LIST) {
vnode = list->list;
while (vnode && vnode->type == VIR_CONF_STRING) {
qemuDomainObjEnterMonitor(driver, vm);
- if (rc == 0 &&
- qemuMonitorDelObject(priv->mon, objAlias, true) < 0)
+ if (qemuMonitorDelObject(priv->mon, objAlias, true) < 0)
rc = -1;
if (rng->backend == VIR_DOMAIN_RNG_BACKEND_EGD &&
goto cleanup;
VIR_DEBUG("Handshake complete, child running");
- if (rv == -1) /* The VM failed to start; tear filters before taps */
+ if (rv == -1) {
+ /* The VM failed to start; tear filters before taps */
virDomainConfVMNWFilterTeardown(vm);
-
- if (rv == -1) /* The VM failed to start */
goto cleanup;
+ }
if (qemuDomainObjStartWorker(vm) < 0)
goto cleanup;
if (spawnDaemon) {
g_autofree char *binname = NULL;
- if (spawnDaemon && !binary) {
+ if (!binary) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Auto-spawn of daemon requested, "
"but no binary specified"));
return -1;
if (ip && virJSONValueObjectAppendString(lease_new, "ip-address", ip) < 0)
return -1;
- if (mac && virJSONValueObjectAppendString(lease_new, "mac-address", mac) < 0)
+ if (virJSONValueObjectAppendString(lease_new, "mac-address", mac) < 0)
return -1;
if (hostname && virJSONValueObjectAppendString(lease_new, "hostname", hostname) < 0)
return -1;
if (disk->src->readonly) {
gVBoxAPI.UIMedium.SetType(medium, MediumType_Immutable);
VIR_DEBUG("Setting hard disk to immutable");
- } else if (!disk->src->readonly) {
+ } else {
gVBoxAPI.UIMedium.SetType(medium, MediumType_Normal);
VIR_DEBUG("Setting hard disk type to normal");
}