]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Enforce return check on virAsprintf() calls
authorJohn Ferlan <jferlan@redhat.com>
Wed, 30 Jan 2013 20:43:39 +0000 (15:43 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 30 Jan 2013 21:42:22 +0000 (14:42 -0700)
commit46b1d8cf7a2b8b3c38ca747aea7cd3951dbea0e1
tree1d2133eb08080bc46d74aef59e00378b751315fd
parent6405713f2ab9243db7d856914aaefbd4f9747daa
Enforce return check on virAsprintf() calls

Way back when I started making changes for Coverity messages my first set
were to a bunch of CHECKED_RETURN errors.  In particular virAsprintf() had
a few callers that Coverity noted didn't check their return (although some
did check if the buffer being printed to was NULL or not).

It was suggested at the time as a further patch an ATTRIBUTE_RETURN_CHECK
should be added to virAsprintf(), see:

https://www.redhat.com/archives/libvir-list/2013-January/msg00120.html

This patch does that and fixes a few more instances not found by Coverity
that failed the check.
src/util/virerror.c
src/util/virutil.h
src/xen/xend_internal.c
tests/networkxml2conftest.c
tools/virsh-domain.c