[PATCH 2/2] util: fix Coverity complaint in virNetDevSetNetConfig()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 81fb440b further qualified an if statement by adding the
boolean saveVlan to the condition, eliminating the need to check
saveVlan in an argument to virAsprintf().
---
 src/util/virnetdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index ae7da5342..51a6e42c5 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -1936,10 +1936,8 @@ virNetDevSaveNetConfig(const char *linkdev, int vf,
             goto cleanup;
 
         /* get admin MAC and vlan tag */
-        if (virNetDevGetVfConfig(pfDevName, vf, &oldMAC,
-                                 saveVlan ? &oldVlanTag : NULL) < 0) {
+        if (virNetDevGetVfConfig(pfDevName, vf, &oldMAC, &oldVlanTag) < 0)
             goto cleanup;
-        }
 
         if (virJSONValueObjectAppendString(configJSON,
                                            VIR_NETDEV_KEYNAME_ADMIN_MAC,
-- 
2.13.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux