]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virIndexToDiskName: Make 'idx' unsigned and remove check
authorPeter Krempa <pkrempa@redhat.com>
Wed, 3 Mar 2021 09:20:00 +0000 (10:20 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 5 Mar 2021 14:33:34 +0000 (15:33 +0100)
commit3b5eab6e250d395681725d64d8bfe1094d4a4436
tree0e3b39a87243e87b3d2e220f0febce3174d68f7b
parentf9eec3714c986212c66889ff1b3886548e7445ea
virIndexToDiskName: Make 'idx' unsigned and remove check

We can remove the check that 'idx' is negative by forcing callers to
pass unsigned numbers, which they do already or have a check that 'idx'
is positive.

This in turn allows us to remove most return value NULL checks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virutil.c
src/util/virutil.h
src/vmx/vmx.c
src/vz/vz_sdk.c