[PATCH 11/31] qemu: capabilities: Don't make callers check return of virQEMUCapsNew(Binary)

Ján Tomko jtomko at redhat.com
Mon Mar 6 13:06:55 UTC 2023


On a Friday in 2023, Peter Krempa wrote:
>The allocation of the object itself can't fail. What can fail is the
>creation of the class on a programmign error. Rather than punting the

*programming

>error up the stack abort() directly on the first occurence as the error
>can't be fixed during runtime.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_capabilities.c     | 20 ++++----------------
> src/qemu/qemu_domain.c           |  3 +--
> tests/cputest.c                  |  3 +--
> tests/qemucapabilitiestest.c     |  6 +++---
> tests/qemucaps2xmltest.c         |  3 +--
> tests/qemuhotplugtest.c          |  3 +--
> tests/qemumemlocktest.c          |  5 +----
> tests/securityselinuxlabeltest.c |  3 +--
> tests/testutilsqemu.c            |  8 +++-----
> 9 files changed, 16 insertions(+), 38 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230306/c42fdab1/attachment.sig>


More information about the libvir-list mailing list