From: Peter Krempa Date: Mon, 10 Oct 2016 04:03:57 +0000 (+0200) Subject: qemu: command: Don't bother reporting errors in smbios formatters X-Git-Tag: v2.4.0-rc1~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec45439512f8136fa9dcdb53215cec0ccbf99d0d;p=thirdparty%2Flibvirt.git qemu: command: Don't bother reporting errors in smbios formatters qemuBuildSmbiosBiosStr and qemuBuildSmbiosSystemStr return NULL if there's nothing to format on the commandline. Reporting errors from buffer creation doesn't make sense since it would be ignored. --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 96d2cc03af..1d1d508245 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5633,14 +5633,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; } @@ -5681,14 +5674,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; }