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 <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2017-08-21 08:38:34 +02:00
parent 7addfa195b
commit 323f7c476e

View File

@ -332,11 +332,7 @@ char *virBitmapString(virBitmapPtr bitmap)
bitmap->map[sz]);
}
if (virBufferError(&buf)) {
virBufferFreeAndReset(&buf);
return NULL;
}
virBufferCheckError(&buf);
return virBufferContentAndReset(&buf);
}