diff options
author | Laine Stump <laine@laine.org> | 2012-02-27 12:22:22 -0500 |
---|---|---|
committer | Laine Stump <laine@laine.org> | 2012-03-05 23:24:44 -0500 |
commit | 16520d6555f2a9b37cad35f3e3cb6d1d067722e4 (patch) | |
tree | a6c3475db52fed3d2f51ec385bc40276f0d3d633 /src | |
parent | conf: change virDomainNetRemove from static to global (diff) | |
download | libvirt-16520d6555f2a9b37cad35f3e3cb6d1d067722e4.tar.gz libvirt-16520d6555f2a9b37cad35f3e3cb6d1d067722e4.tar.bz2 libvirt-16520d6555f2a9b37cad35f3e3cb6d1d067722e4.zip |
qemu: use virDomainNetRemove instead of inline code
The code being replaced is exactly identical to the newly global
function, right down to the comment.
Diffstat (limited to 'src')
-rw-r--r-- | src/qemu/qemu_hotplug.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index cb4138828..6119108b0 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2158,19 +2158,7 @@ qemuDomainDetachNetDevice(struct qemud_driver *driver, detach->ifname)); networkReleaseActualDevice(detach); - if (vm->def->nnets > 1) { - memmove(vm->def->nets + i, - vm->def->nets + i + 1, - sizeof(*vm->def->nets) * - (vm->def->nnets - (i + 1))); - vm->def->nnets--; - if (VIR_REALLOC_N(vm->def->nets, vm->def->nnets) < 0) { - /* ignore, harmless */ - } - } else { - VIR_FREE(vm->def->nets); - vm->def->nnets = 0; - } + virDomainNetRemove(vm->def, i); virDomainNetDefFree(detach); ret = 0; |