提交 ec454395 编写于 作者: P Peter Krempa

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.
上级 8d67e284
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册