[PATCH 10/12] Add OOM error reporting to a few fucntions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



They report errors in all other cases.
---
 src/lxc/lxc_container.c      | 2 +-
 src/qemu/qemu_capabilities.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index fd8ab16..4d89677 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 8e0a550..751c143 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, "</qemuCaps>\n");
 
-    if (virBufferError(&buf))
+    if (virBufferCheckError(&buf) < 0)
         goto cleanup;
 
     xml = virBufferContentAndReset(&buf);
-- 
1.8.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]