qemuBuildSmbiosBiosStr and qemuBuildSmbiosSystemStr return NULL if there's noting to format on the commandline. Reporting errors from buffer creation doesn't make sense since it would be ignored. --- src/qemu/qemu_command.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 13c2cde..11ae363 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5717,14 +5717,7 @@ qemuBuildSmbiosBiosStr(virSysinfoBIOSDefPtr def) if (def->release) virBufferAsprintf(&buf, ",release=%s", def->release); - if (virBufferCheckError(&buf) < 0) - goto error; - return virBufferContentAndReset(&buf); - - error: - virBufferFreeAndReset(&buf); - return NULL; } @@ -5765,14 +5758,7 @@ qemuBuildSmbiosSystemStr(virSysinfoSystemDefPtr def, if (def->family) virBufferAsprintf(&buf, ",family=%s", def->family); - if (virBufferCheckError(&buf) < 0) - goto error; - return virBufferContentAndReset(&buf); - - error: - virBufferFreeAndReset(&buf); - return NULL; } -- 2.10.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list