]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Add OOM error reporting to a few fucntions
authorJán Tomko <jtomko@redhat.com>
Fri, 27 Jun 2014 08:47:11 +0000 (10:47 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 3 Jul 2014 08:48:14 +0000 (10:48 +0200)
They report errors in all other cases.

src/lxc/lxc_container.c
src/qemu/qemu_capabilities.c

index fd8ab167f8945d33ba6f82e6f0aed84814fa98c0..4d896778146fb8e0a9afbf6181de0a3d94130399 100644 (file)
@@ -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);
index 8e0a55089d2f276f374d035c9c4b8baebbb775b4..751c14309aca8bf68e0544557fd6ee40d3eabcef 100644 (file)
@@ -2686,7 +2686,7 @@ virQEMUCapsSaveCache(virQEMUCapsPtr qemuCaps, const char *filename)
     virBufferAdjustIndent(&buf, -2);
     virBufferAddLit(&buf, "</qemuCaps>\n");
 
-    if (virBufferError(&buf))
+    if (virBufferCheckError(&buf) < 0)
         goto cleanup;
 
     xml = virBufferContentAndReset(&buf);