[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140512.010152.808234287210437125.davem@davemloft.net>
Date: Mon, 12 May 2014 01:01:52 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: duanj.fnst@...fujitsu.com
Cc: hannes@...essinduktion.org, netdev@...r.kernel.org
Subject: Re: [PATCH] ipv6: update Destination Cache entries when gateway
turn into host
From: Duan Jiong <duanj.fnst@...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 "=="
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists