From 1199c4f569175e09a33bf6b1af3a8faadbf9dc04 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 14 Jul 2014 12:06:52 -0700 Subject: [PATCH] ip: add paren to silence warning Gcc doesn't like mixed || and && in same conditional. --- ip/ipaddress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 8138e862..8bb85119 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -1329,7 +1329,7 @@ void ipaddr_get_vf_rate(int vfnum, int *min, int *max, int idx) ifi = NLMSG_DATA(n); len = n->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi)); - if (len < 0 || idx && idx != ifi->ifi_index) + if (len < 0 || (idx && idx != ifi->ifi_index)) continue; parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len);