[libvirt] [PATCH 4/5] remove no longer needed calls to virReportOOMError
Eric Blake
eblake at redhat.com
Fri Feb 18 00:01:51 UTC 2011
On 02/17/2011 02:14 PM, Christophe Fergeau wrote:
> Now that the virHash handling functions call virReportOOMError by
> themselves when needed, users of the virHash API no longer need to
> do it by themselves. Since users of the virHash API were not
> consitently calling virReportOOMError after memory failures from
s/consitently/consistently/
> diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c
> index c593481..02af918 100644
> --- a/src/nwfilter/nwfilter_learnipaddr.c
> +++ b/src/nwfilter/nwfilter_learnipaddr.c
> @@ -165,7 +165,6 @@ virNWFilterLockIface(const char *ifname) {
> }
>
> while (virHashAddEntry(ifaceLockMap, ifname, ifaceLock)) {
> - virReportOOMError();
> VIR_FREE(ifaceLock);
> goto err_exit;
> }
What an odd-looking control flow, when an 'if' would have been more
idiomatic. But independent of this patch.
You missed one in qemu_process:
diff --git i/src/qemu/qemu_process.c w/src/qemu/qemu_process.c
index 46da600..5237e2b 100644
--- i/src/qemu/qemu_process.c
+++ w/src/qemu/qemu_process.c
@@ -995,10 +995,8 @@ qemuProcessWaitForMonitor(struct qemud_driver* driver,
* Note that the monitor itself can be on a pty, so we still need
to try the
* log output method. */
paths = virHashCreate(0);
- if (paths == NULL) {
- virReportOOMError();
+ if (paths == NULL)
goto cleanup;
- }
qemuDomainObjEnterMonitorWithDriver(driver, vm);
qemuDomainObjPrivatePtr priv = vm->privateData;
ACK with those corrections, so pushed.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110217/836256f0/attachment-0001.sig>
More information about the libvir-list
mailing list