Re: [PATCH] hw/xen: clean up xen_block_find_free_vdev() to avoid Coverity false positive

2023-11-09 Thread Peter Maydell
On Thu, 9 Nov 2023 at 15:30, David Woodhouse wrote: > > From: David Woodhouse > > Coverity couldn't see that nr_existing was always going to be zero when > qemu_xen_xs_directory() returned NULL in the ENOENT case (CID 1523906). > > Perhaps more to the point, neither could Peter at first glance.

Re: [PATCH] hw/xen: clean up xen_block_find_free_vdev() to avoid Coverity false positive

2023-11-09 Thread Paul Durrant
On 09/11/2023 15:30, David Woodhouse wrote: From: David Woodhouse Coverity couldn't see that nr_existing was always going to be zero when qemu_xen_xs_directory() returned NULL in the ENOENT case (CID 1523906). Perhaps more to the point, neither could Peter at first glance. Improve the code to

[PATCH] hw/xen: clean up xen_block_find_free_vdev() to avoid Coverity false positive

2023-11-09 Thread David Woodhouse
From: David Woodhouse Coverity couldn't see that nr_existing was always going to be zero when qemu_xen_xs_directory() returned NULL in the ENOENT case (CID 1523906). Perhaps more to the point, neither could Peter at first glance. Improve the code to hopefully make it clearer to Coverity and