Blame SOURCES/libvirt-util-make-forgotten-changes-suggested-during-review-of-commit-d40b820c.patch

edecca
From dc8506596662fcf2a9aa7942cb1ee081984a23d1 Mon Sep 17 00:00:00 2001
edecca
Message-Id: <dc8506596662fcf2a9aa7942cb1ee081984a23d1@dist-git>
edecca
From: Laine Stump <laine@laine.org>
edecca
Date: Mon, 14 Jan 2019 11:35:06 -0500
edecca
Subject: [PATCH] util: make forgotten changes suggested during review of
edecca
 commit d40b820c
edecca
MIME-Version: 1.0
edecca
Content-Type: text/plain; charset=UTF-8
edecca
Content-Transfer-Encoding: 8bit
edecca
edecca
I had intended to make these changes to commit d40b820c before
edecca
pushing, but forgot about it during the day between the initial review
edecca
and ACK.
edecca
edecca
Neither change is significant - just returning immediately when
edecca
virNetDevGetName() fails (instead of logging a debug message first)
edecca
and eliminating a comment that adds to confusion rather than
edecca
eliminating it. Still, the changes should be made to be more
edecca
consistent with nearly identical code just a few lines up (added in
edecca
commit 7282f455)
edecca
edecca
Signed-off-by: Laine Stump <laine@laine.org>
edecca
Reviewed-by: Ján Tomko <jtomko@redhat.com>
edecca
(cherry picked from commit 85f223a8f2480ad446251639a078bb9420072506)
edecca
edecca
https://bugzilla.redhat.com/1583131
edecca
edecca
Conflicts: src/util/virnetdevip.c - more context conflicts
edecca
Signed-off-by: Laine Stump <laine@laine.org>
edecca
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
edecca
---
edecca
 src/util/virnetdevip.c | 12 ++++++------
edecca
 1 file changed, 6 insertions(+), 6 deletions(-)
edecca
edecca
diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c
edecca
index fff41ec498..6400887666 100644
edecca
--- a/src/util/virnetdevip.c
edecca
+++ b/src/util/virnetdevip.c
edecca
@@ -619,18 +619,18 @@ virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr *resp,
edecca
 
edecca
             ifname = virNetDevGetName(nh->rtnh_ifindex);
edecca
 
edecca
-            if (ifname)
edecca
-                accept_ra = virNetDevIPGetAcceptRA(ifname);
edecca
+            if (!ifname)
edecca
+               goto error;
edecca
+
edecca
+            accept_ra = virNetDevIPGetAcceptRA(ifname);
edecca
 
edecca
             VIR_DEBUG("Checking multipath route nexthop device %s (%d), accept_ra: %d",
edecca
                       ifname, nh->rtnh_ifindex, accept_ra);
edecca
 
edecca
-            if (!ifname ||
edecca
-                (accept_ra != 2 && virNetDevIPCheckIPv6ForwardingAddIF(data, &ifname) < 0)) {
edecca
+            if (accept_ra != 2 && virNetDevIPCheckIPv6ForwardingAddIF(data, &ifname) < 0)
edecca
                 goto error;
edecca
-            }
edecca
 
edecca
-            VIR_FREE(ifname); /* in case it wasn't added to the array */
edecca
+            VIR_FREE(ifname);
edecca
             data->hasRARoutes = true;
edecca
 
edecca
             len -= NLMSG_ALIGN(nh->rtnh_len);
edecca
-- 
edecca
2.20.1
edecca