From: Ján Tomko Date: Fri, 27 Jun 2014 08:47:11 +0000 (+0200) Subject: Add OOM error reporting to a few fucntions X-Git-Tag: v1.2.7-rc1~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c997e45408567fe51ffd746681a0eba428144ab0;p=thirdparty%2Flibvirt.git Add OOM error reporting to a few fucntions They report errors in all other cases. --- diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index fd8ab167f8..4d89677814 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -223,7 +223,7 @@ static virCommandPtr lxcContainerBuildInitCmd(virDomainDefPtr vmDef, } virBufferTrim(&buf, NULL, 1); - if (virBufferError(&buf)) + if (virBufferCheckError(&buf) < 0) return NULL; virUUIDFormat(vmDef->uuid, uuidstr); diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 8e0a55089d..751c14309a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2686,7 +2686,7 @@ virQEMUCapsSaveCache(virQEMUCapsPtr qemuCaps, const char *filename) virBufferAdjustIndent(&buf, -2); virBufferAddLit(&buf, "\n"); - if (virBufferError(&buf)) + if (virBufferCheckError(&buf) < 0) goto cleanup; xml = virBufferContentAndReset(&buf);