mirror of https://gitee.com/openkylin/libvirt.git
qemu_hotplug: Drop dead code in net update
vm->def->nets[changeidx] can never be NULL for changeidx returned by virDomainNetFindIdx. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
3154b3414a
commit
64ba7803ca
|
@ -3061,12 +3061,7 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
|
|||
if ((changeidx = virDomainNetFindIdx(vm->def, newdev)) < 0)
|
||||
goto cleanup;
|
||||
devslot = &vm->def->nets[changeidx];
|
||||
|
||||
if (!(olddev = *devslot)) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
_("cannot find existing network device to modify"));
|
||||
goto cleanup;
|
||||
}
|
||||
olddev = *devslot;
|
||||
|
||||
oldType = virDomainNetGetActualType(olddev);
|
||||
if (oldType == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
|
||||
|
|
Loading…
Reference in New Issue