mirror of https://gitee.com/openkylin/libvirt.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 <mkletzan@redhat.com>
This commit is contained in:
parent
7addfa195b
commit
323f7c476e
|
@ -332,11 +332,7 @@ char *virBitmapString(virBitmapPtr bitmap)
|
|||
bitmap->map[sz]);
|
||||
}
|
||||
|
||||
if (virBufferError(&buf)) {
|
||||
virBufferFreeAndReset(&buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virBufferCheckError(&buf);
|
||||
return virBufferContentAndReset(&buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue