]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Remove _NULLABLE in virNetDevExists mock
authorJohn Ferlan <jferlan@redhat.com>
Sun, 3 Nov 2019 12:34:04 +0000 (07:34 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 6 Nov 2019 16:27:12 +0000 (11:27 -0500)
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tests/qemuxml2argvmock.c

index 914d2bcf9fe52d62eb8057a185009673158f8a4c..8143de16185777cd52dcb800e318394e7900053a 100644 (file)
@@ -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");
 }