naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0226-ip-add-paren-to-silence-warning.patch

049c96
From e711f1b53b6d8cb7d067935d3bddccf289fe486e Mon Sep 17 00:00:00 2001
049c96
From: Phil Sutter <psutter@redhat.com>
049c96
Date: Wed, 27 Jul 2016 17:26:55 +0200
049c96
Subject: [PATCH] ip: add paren to silence warning
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1340914
049c96
Upstream Status: iproute2.git commit 1199c4f569175
049c96
049c96
commit 1199c4f569175e09a33bf6b1af3a8faadbf9dc04
049c96
Author: Stephen Hemminger <stephen@networkplumber.org>
049c96
Date:   Mon Jul 14 12:06:52 2014 -0700
049c96
049c96
    ip: add paren to silence warning
049c96
049c96
    Gcc doesn't like mixed || and && in same conditional.
049c96
---
049c96
 ip/ipaddress.c | 2 +-
049c96
 1 file changed, 1 insertion(+), 1 deletion(-)
049c96
049c96
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
049c96
index 45e747b..112c34b 100644
049c96
--- a/ip/ipaddress.c
049c96
+++ b/ip/ipaddress.c
049c96
@@ -1505,7 +1505,7 @@ void ipaddr_get_vf_rate(int vfnum, int *min, int *max, int idx)
049c96
 		ifi = NLMSG_DATA(n);
049c96
 
049c96
 		len = n->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi));
049c96
-		if (len < 0 || idx && idx != ifi->ifi_index)
049c96
+		if (len < 0 || (idx && idx != ifi->ifi_index))
049c96
 			continue;
049c96
 
049c96
 		parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len);
049c96
-- 
049c96
1.8.3.1
049c96