[PATCH 2/4] util: Use virBufferCheckError to its full potential.

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

 



We can now check for the error and not care about the return value as
it will be properly handled in virBufferContentAndReset() anyway.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/util/virbitmap.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index a5077fe7c8bf..57a8fbf82c78 100644
--- a/src/util/virbitmap.c
+++ b/src/util/virbitmap.c
@@ -332,11 +332,7 @@ char *virBitmapString(virBitmapPtr bitmap)
                           bitmap->map[sz]);
     }
 
-    if (virBufferError(&buf)) {
-        virBufferFreeAndReset(&buf);
-        return NULL;
-    }
-
+    virBufferCheckError(&buf);
     return virBufferContentAndReset(&buf);
 }
 
-- 
2.14.1

--
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]
  Powered by Linux