summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorRongQing.Li <roy.qing.li@gmail.com>2012-04-05 17:36:29 +0800
committerDavid S. Miller <davem@davemloft.net>2012-04-05 05:42:18 -0400
commitce713ee5a10f3a171df94b0d501034aab2388c16 (patch)
treefc51b89dc562d3b49bc6db964f405fda0575c03d /net/ipv6
parent51c56b004e2c9a46207bb8a116589c2f84b92e5d (diff)
downloadlinux-3.10-ce713ee5a10f3a171df94b0d501034aab2388c16.tar.gz
linux-3.10-ce713ee5a10f3a171df94b0d501034aab2388c16.tar.bz2
linux-3.10-ce713ee5a10f3a171df94b0d501034aab2388c16.zip
net: replace continue with break to reduce unnecessary loop in xxx_xmarksources
The conditional which decides to skip inactive filters does not change with the change of loop index, so it is unnecessary to check them many times. Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/mcast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 16c33e30812..6264d8fd2a2 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -1061,7 +1061,7 @@ static int mld_xmarksources(struct ifmcaddr6 *pmc, int nsrcs,
if (psf->sf_count[MCAST_INCLUDE] ||
pmc->mca_sfcount[MCAST_EXCLUDE] !=
psf->sf_count[MCAST_EXCLUDE])
- continue;
+ break;
if (ipv6_addr_equal(&srcs[i], &psf->sf_addr)) {
scount++;
break;