[libvirt] [PATCH 5/8] tests: Remove _NULLABLE in virNetDevExists mock

John Ferlan jferlan at redhat.com
Sun Nov 3 13:53:37 UTC 2019


The @ifname is listed as an ATTRIBUTE_NONNULL(1) parameter, so
checking for _NULLABLE causes a coverity build failure - remove
that and if it's NULL for the test let's fail miserably.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 tests/qemuxml2argvmock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c
index 914d2bcf9f..8143de1618 100644
--- a/tests/qemuxml2argvmock.c
+++ b/tests/qemuxml2argvmock.c
@@ -169,7 +169,7 @@ virNetDevSetMAC(const char *ifname G_GNUC_UNUSED,
 int
 virNetDevExists(const char *ifname)
 {
-    return STREQ_NULLABLE(ifname, "mytap0");
+    return STREQ(ifname, "mytap0");
 }
 
 
-- 
2.20.1




More information about the libvir-list mailing list