Blame SOURCES/libvirt-util-eliminate-superfluous-saveVlan-check-in-virNetDevSetNetConfig.patch

6d3351
From b18e5e3ddd2cdd177f598cf44f2b21fe47db51a2 Mon Sep 17 00:00:00 2001
6d3351
Message-Id: <b18e5e3ddd2cdd177f598cf44f2b21fe47db51a2@dist-git>
6d3351
From: Laine Stump <laine@laine.org>
6d3351
Date: Mon, 14 Aug 2017 21:28:24 -0400
6d3351
Subject: [PATCH] util: eliminate superfluous saveVlan check in
6d3351
 virNetDevSetNetConfig()
6d3351
6d3351
Commit 81fb440b further qualified an if statement by adding the
6d3351
boolean saveVlan to the condition. Coverity pointed out that this
6d3351
change in the logic eliminated the need to check saveVlan in an
6d3351
argument to virAsprintf().
6d3351
6d3351
  Resolves: https://bugzilla.redhat.com/1460082
6d3351
6d3351
(cherry picked from commit f5bc8b54363233ae42a50094faef4f703e46cd28)
6d3351
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
---
6d3351
 src/util/virnetdev.c | 4 +---
6d3351
 1 file changed, 1 insertion(+), 3 deletions(-)
6d3351
6d3351
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
6d3351
index 2e569da2c8..73be9a312d 100644
6d3351
--- a/src/util/virnetdev.c
6d3351
+++ b/src/util/virnetdev.c
6d3351
@@ -1936,10 +1936,8 @@ virNetDevSaveNetConfig(const char *linkdev, int vf,
6d3351
             goto cleanup;
6d3351
 
6d3351
         /* get admin MAC and vlan tag */
6d3351
-        if (virNetDevGetVfConfig(pfDevName, vf, &oldMAC,
6d3351
-                                 saveVlan ? &oldVlanTag : NULL) < 0) {
6d3351
+        if (virNetDevGetVfConfig(pfDevName, vf, &oldMAC, &oldVlanTag) < 0)
6d3351
             goto cleanup;
6d3351
-        }
6d3351
 
6d3351
         if (virJSONValueObjectAppendString(configJSON,
6d3351
                                            VIR_NETDEV_KEYNAME_ADMIN_MAC,
6d3351
-- 
6d3351
2.14.1
6d3351