summaryrefslogtreecommitdiff
path: root/tests/networkxml2conftest.c
diff options
context:
space:
mode:
authorJohn Ferlan <jferlan@redhat.com>2013-01-30 15:43:39 -0500
committerEric Blake <eblake@redhat.com>2013-01-30 14:42:22 -0700
commit46b1d8cf7a2b8b3c38ca747aea7cd3951dbea0e1 (patch)
tree1d2133eb08080bc46d74aef59e00378b751315fd /tests/networkxml2conftest.c
parent6405713f2ab9243db7d856914aaefbd4f9747daa (diff)
downloadlibvirt-46b1d8cf7a2b8b3c38ca747aea7cd3951dbea0e1.tar.gz
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.
Diffstat (limited to 'tests/networkxml2conftest.c')
-rw-r--r--tests/networkxml2conftest.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c
index 397954089e..88016ee119 100644
--- a/tests/networkxml2conftest.c
+++ b/tests/networkxml2conftest.c
@@ -102,9 +102,8 @@ testDnsmasqLeaseFileName(const char *netname)
{
char *leasefile;
- virAsprintf(&leasefile, "/var/lib/libvirt/dnsmasq/%s.leases",
- netname);
-
+ ignore_value(virAsprintf(&leasefile, "/var/lib/libvirt/dnsmasq/%s.leases",
+ netname));
return leasefile;
}