]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ip: add paren to silence warning
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 14 Jul 2014 19:06:52 +0000 (12:06 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 14 Jul 2014 19:06:52 +0000 (12:06 -0700)
Gcc doesn't like mixed || and && in same conditional.

ip/ipaddress.c

index 8138e8626c8792d642568dcd4b7a15026c1a69bd..8bb8511977adfe5ca85bf43da81aaa37f1c90d95 100644 (file)
@@ -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);