* [PATCH v2] ipv6: fix array index in ip6_mc_add_src()
@ 2012-04-05 2:47 roy.qing.li
2012-04-05 4:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2012-04-05 2:47 UTC (permalink / raw)
To: netdev
From: RongQing.Li <roy.qing.li@gmail.com>
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>
---
net/ipv6/mcast.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 16c33e3..c6378de 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2044,7 +2044,7 @@ static int ip6_mc_add_src(struct inet6_dev *idev, const struct in6_addr *pmca,
if (!delta)
pmc->mca_sfcount[sfmode]--;
for (j=0; j<i; j++)
- (void) ip6_mc_del1_src(pmc, sfmode, &psfsrc[i]);
+ ip6_mc_del1_src(pmc, sfmode, &psfsrc[j]);
} else if (isexclude != (pmc->mca_sfcount[MCAST_EXCLUDE] != 0)) {
struct ip6_sf_list *psf;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ipv6: fix array index in ip6_mc_add_src()
2012-04-05 2:47 [PATCH v2] ipv6: fix array index in ip6_mc_add_src() roy.qing.li
@ 2012-04-05 4:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-04-05 4:01 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev
From: roy.qing.li@gmail.com
Date: Thu, 5 Apr 2012 10:47:04 +0800
> From: RongQing.Li <roy.qing.li@gmail.com>
>
> 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>
Applied and queued up for -stable, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-05 4:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 2:47 [PATCH v2] ipv6: fix array index in ip6_mc_add_src() roy.qing.li
2012-04-05 4:01 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).