From: Martin Kletzander Date: Mon, 21 Aug 2017 06:38:34 +0000 (+0200) Subject: util: Use virBufferCheckError to its full potential. X-Git-Tag: v3.7.0-rc1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=323f7c476e381d202eb0978fac30172f7a438e78;p=thirdparty%2Flibvirt.git util: Use virBufferCheckError to its full potential. 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 --- diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index a5077fe7c8..57a8fbf82c 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); }