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

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



On 09/11/2023 15:30, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>

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 human reviewers
alike.

Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
  hw/block/xen-block.c | 24 +++++++++++++++++++++---
  1 file changed, 21 insertions(+), 3 deletions(-)


Reviewed-by: Paul Durrant <paul@xxxxxxx>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.