[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 01/13] virStorageSourceNew: Abort on failure



On a Wednesday in 2020, Peter Krempa wrote:
Add an abort() on the class/object allocation failures so that
virStorageSourceNew() always returns a virStorageSource and remove
checks from all callers.


The allocation APIs in GLib and libvirt already do abort().
All that's left are usage errors.

Signed-off-by: Peter Krempa <pkrempa redhat com>
---
src/conf/backup_conf.c                |  7 ++----
src/conf/domain_conf.c                | 21 ++++++------------
src/conf/snapshot_conf.c              |  7 ++----
src/conf/storage_conf.c               |  4 +---
src/qemu/qemu_domain.c                | 21 ++++++------------
src/qemu/qemu_driver.c                | 12 +++-------
src/qemu/qemu_migration.c             |  7 ++----
src/qemu/qemu_snapshot.c              |  3 +--
src/storage/storage_backend_gluster.c |  5 +----
src/storage/storage_backend_logical.c |  4 +---
src/storage/storage_util.c            | 10 +++------
src/util/virstoragefile.c             | 32 ++++++++++-----------------
tests/qemublocktest.c                 | 16 +++-----------
tests/virstoragetest.c                |  5 +----
14 files changed, 46 insertions(+), 108 deletions(-)


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

Jano

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]