提交 64ba7803 编写于 作者: J Jiri Denemark

qemu_hotplug: Drop dead code in net update

vm->def->nets[changeidx] can never be NULL for changeidx returned by
virDomainNetFindIdx.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 3154b341
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册