aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorRongQing.Li <roy.qing.li@gmail.com>2012-04-04 12:47:04 -0400
committerLuis Henriques <luis.henriques@canonical.com>2012-05-01 06:00:20 -0400
commit779f59560f480eca92cc0b55e37bafbdfe254c87 (patch)
treede474e5632e39062a4a07b6eb58a8828a22de4c3 /net/ipv6
parente4f3d07084b320d8a682bb9007f67d4eed03335e (diff)
ipv6: fix array index in ip6_mc_add_src()
BugLink: http://bugs.launchpad.net/bugs/990544 [ Upstream commit 78d50217baf36093ab320f95bae0d6452daec85c ] Convert array index from the loop bound to the loop index. And remove the void type conversion to ip6_mc_del1_src() return code, seem it is unnecessary, since ip6_mc_del1_src() does not use __must_check similar attribute, no compiler will report the warning when it is removed. v2: enrich the commit header Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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 225736697df..f2d74ea19a7 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2054,7 +2054,7 @@ static int ip6_mc_add_src(struct inet6_dev *idev, const struct in6_addr *pmca,
2054 if (!delta) 2054 if (!delta)
2055 pmc->mca_sfcount[sfmode]--; 2055 pmc->mca_sfcount[sfmode]--;
2056 for (j=0; j<i; j++) 2056 for (j=0; j<i; j++)
2057 (void) ip6_mc_del1_src(pmc, sfmode, &psfsrc[i]); 2057 ip6_mc_del1_src(pmc, sfmode, &psfsrc[j]);
2058 } else if (isexclude != (pmc->mca_sfcount[MCAST_EXCLUDE] != 0)) { 2058 } else if (isexclude != (pmc->mca_sfcount[MCAST_EXCLUDE] != 0)) {
2059 struct ip6_sf_list *psf; 2059 struct ip6_sf_list *psf;
2060 2060