From patchwork Thu Apr 5 02:47:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li RongQing X-Patchwork-Id: 150842 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 16F56B702F for ; Thu, 5 Apr 2012 12:47:15 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756787Ab2DECrM (ORCPT ); Wed, 4 Apr 2012 22:47:12 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:48735 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754162Ab2DECrL (ORCPT ); Wed, 4 Apr 2012 22:47:11 -0400 Received: by qadc11 with SMTP id c11so627387qad.19 for ; Wed, 04 Apr 2012 19:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=+bnDxL/nuIVVer/g3fGtHLKL1VTnM8OryQ2VSJV7NzA=; b=LETM5kj8q9uBej2E906tiQPijCI/Uo5H1iAscSC26RhVmwPeysgET3eOqq08tt9m0R ZIBvWR//jiBKpz8U6L6/x/4I+pkr6umboQexzAQCotf5it+4iNfWtESLs9mXgUUxWUY7 Zcn8/ww5rRgF2WEDINNKHBP9P/yi6LOalPqzuq/NIZ3V5Hs7b7pSS0qlK6m+AQu3sGqG 0xdyYUS/DeR0CwMZSyaDfBBw/03rZylHhl1turTwHkcU8pPldlUXjnL8jesiMeKs9DZc OieHEtgQkBJL06nss13xygZSHxBv8DEANLNKVQWcI9aP4k6hnBDZA3v4ASHr1eE+fFhB +xMg== Received: by 10.229.136.196 with SMTP id s4mr333940qct.71.1333594030898; Wed, 04 Apr 2012 19:47:10 -0700 (PDT) Received: from localhost ([61.148.56.138]) by mx.google.com with ESMTPS id de7sm2145228qab.16.2012.04.04.19.47.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 19:47:10 -0700 (PDT) From: roy.qing.li@gmail.com To: netdev@vger.kernel.org Subject: [PATCH v2] ipv6: fix array index in ip6_mc_add_src() Date: Thu, 5 Apr 2012 10:47:04 +0800 Message-Id: <1333594024-24347-1-git-send-email-roy.qing.li@gmail.com> X-Mailer: git-send-email 1.7.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: RongQing.Li 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 --- 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; jmca_sfcount[MCAST_EXCLUDE] != 0)) { struct ip6_sf_list *psf;