From: David Miller <davem@davemloft.net>
To: duanj.fnst@cn.fujitsu.com
Cc: hannes@stressinduktion.org, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: update Destination Cache entries when gateway turn into host
Date: Mon, 12 May 2014 01:01:52 -0400 (EDT) [thread overview]
Message-ID: <20140512.010152.808234287210437125.davem@davemloft.net> (raw)
In-Reply-To: <536C4A74.2050103@cn.fujitsu.com>
From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Date: Fri, 9 May 2014 11:24:36 +0800
> +/*remove routers and update dst entries when gateway turn into host.*/
This comment is poorly formatted.
Please put a space after "/*", capitalize "Remove" and place
a space before "*/" at the end of the comment.
> +static int fib6_clean_tohost(struct rt6_info *rt, void *arg)
> +{
> + struct in6_addr *gateway = (struct in6_addr *)arg;
> +
> + if (((rt->rt6i_flags & (RTF_ADDRCONF | RTF_DEFAULT | RTF_GATEWAY))
> + == (RTF_ADDRCONF | RTF_DEFAULT | RTF_GATEWAY))
> + && ipv6_addr_equal(gateway, &rt->rt6i_gateway)) {
This conditional is poorly formatted:
> + } else if (((rt->rt6i_flags & (RTF_GATEWAY | RTF_CACHE))
> + == (RTF_GATEWAY | RTF_CACHE))
> + && ipv6_addr_equal(gateway, &rt->rt6i_gateway)) {
As is this one.
Never put operators at the beginning of a continuation line, rather
put them at the end of the previous line. This includes "&&", "||",
and "=="
prev parent reply other threads:[~2014-05-12 5:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 3:24 [PATCH] ipv6: update Destination Cache entries when gateway turn into host Duan Jiong
2014-05-12 0:54 ` Hannes Frederic Sowa
2014-05-12 3:07 ` Duan Jiong
2014-05-12 10:13 ` Hannes Frederic Sowa
2014-05-12 5:01 ` David Miller [this message]
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=20140512.010152.808234287210437125.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=duanj.fnst@cn.fujitsu.com \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).