[libvirt] [PATCH 1/1] Fix issue found by coverity and cleanup

Pavel Hrdina phrdina at redhat.com
Mon Mar 17 14:50:40 UTC 2014


On 17.3.2014 15:36, Daniel P. Berrange wrote:
> On Mon, Mar 17, 2014 at 03:22:11PM +0100, Pavel Hrdina wrote:
>> Coverity found an issue in lxc_driver and uml_driver that we don't
>> check the return value of register functions.
>>
>> I've also updated all other places and unify the way we check the
>> return value.
>>
>> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
>> ---
>>   src/bhyve/bhyve_driver.c                |  6 ++++--
>>   src/interface/interface_backend_netcf.c |  3 ++-
>>   src/lxc/lxc_driver.c                    |  6 ++++--
>>   src/network/bridge_driver.c             |  3 ++-
>>   src/nwfilter/nwfilter_driver.c          |  9 ++++++---
>>   src/qemu/qemu_driver.c                  |  6 ++++--
>>   src/remote/remote_driver.c              | 24 ++++++++++++++++--------
>>   src/secret/secret_driver.c              |  6 ++++--
>>   src/storage/storage_driver.c            |  3 ++-
>>   src/uml/uml_driver.c                    |  6 ++++--
>>   10 files changed, 48 insertions(+), 24 deletions(-)
>
> ACK

Thanks, pushed.

>
> How about adding ATTRIBUTE_RETURN_CHECK onto all the virRegister
> function declarations too, so gcc enforces this.
>

That's a good idea, I'll send another patch for that.

Pavel

> Regards,
> Daniel
>




More information about the libvir-list mailing list