[PATCH 02/10] Drop checks for virURIFormat() retval

Peter Krempa pkrempa at redhat.com
Mon Feb 6 15:05:01 UTC 2023


On Mon, Feb 06, 2023 at 10:16:50 +0100, Michal Privoznik wrote:
> The virURIFormat() function either returns a string, or aborts
> (on OOM). There's no way this function can return NULL (as of
> v7.2.0-rc1~277). Therefore, it doesn't make sense to check its
> retval against NULL.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/admin/libvirt-admin.c             |  6 +-----
>  src/libvirt-host.c                    | 10 +---------
>  src/qemu/qemu_block.c                 |  3 +--
>  src/qemu/qemu_migration.c             |  3 +--
>  src/remote/remote_driver.c            |  3 ---
>  src/storage/storage_backend_gluster.c |  6 +-----
>  src/util/viruri.c                     |  2 +-
>  tests/viruritest.c                    |  3 +--
>  8 files changed, 7 insertions(+), 29 deletions(-)

Reviewed-by: Peter Krempa <pkrempa at redhat.com>


More information about the libvir-list mailing list