From: David Miller <davem@davemloft.net>
To: hariprasad.kelam@gmail.com
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipv6: exthdrs: fix warning comparison to bool
Date: Sun, 09 Jun 2019 19:54:20 -0700 (PDT) [thread overview]
Message-ID: <20190609.195420.1742255944804133266.davem@davemloft.net> (raw)
In-Reply-To: <20190608083532.GA7288@hari-Inspiron-1545>
From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Date: Sat, 8 Jun 2019 14:05:33 +0530
> Fix below warning reported by coccicheck
>
> net/ipv6/exthdrs.c:180:9-29: WARNING: Comparison to bool
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
...
> diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
> index ab5add0..e137325 100644
> --- a/net/ipv6/exthdrs.c
> +++ b/net/ipv6/exthdrs.c
> @@ -177,7 +177,7 @@ static bool ip6_parse_tlv(const struct tlvtype_proc *procs,
> /* type specific length/alignment
> checks will be performed in the
> func(). */
> - if (curr->func(skb, off) == false)
> + if (!curr->func(skb, off))
curr->func() returns type 'bool', whats wrong with comparing against the
same type?
I'm not applying stuff like this, sorry.
next prev parent reply other threads:[~2019-06-10 2:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-08 8:35 [PATCH] ipv6: exthdrs: fix warning comparison to bool Hariprasad Kelam
2019-06-10 2:54 ` David Miller [this message]
2019-06-10 19:24 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190609.195420.1742255944804133266.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=hariprasad.kelam@gmail.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox