[libvirt] [PATCH 2/4] qemu: command: Don't bother reporting errors in smbios formatters

John Ferlan jferlan at redhat.com
Thu Oct 13 21:11:54 UTC 2016



On 10/10/2016 11:51 AM, Peter Krempa wrote:
> qemuBuildSmbiosBiosStr and qemuBuildSmbiosSystemStr return NULL if
> there's noting to format on the commandline. Reporting errors from

nothing

> buffer creation doesn't make sense since it would be ignored.

Introduced by 54c0237ccb, so it's been this way a long time...

> ---
>  src/qemu/qemu_command.c | 14 --------------
>  1 file changed, 14 deletions(-)
> 

I suppose since it seems the only legitimate error you'll hit is ENOMEM
and if you ignore it here, some shortly to be run code is sure to run
into it, then no big deal...

Although, one could argue the callers should check/return on error, but
they'd probably lose that argument.

ACK for what's here

John




More information about the libvir-list mailing list