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(a)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(a)redhat.com>
Jano