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

Daniel P. Berrange berrange at redhat.com
Mon Mar 17 14:36:37 UTC 2014


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

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

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list