Re: [net-next-2.6 PATCH v7 5/7 RFC] TCPCT part 1e: implement socket option TCP_COOKIE_TRANSACTIONS
From: Joe Perches <joe@perches.com>
Date: 2009-11-22 07:10:43
From: Joe Perches <joe@perches.com>
Date: 2009-11-22 07:10:43
On Sun, 2009-11-22 at 01:25 -0500, William Allen Simpson wrote:
David Miller wrote:quoted
From: William Allen Simpson <redacted> Date: Fri, 20 Nov 2009 09:48:12 -0500quoted
+ if (ctd.tcpct_used > 0 + || (tp->cookie_values == NULL + && (sysctl_tcp_cookie_size > 0 + || ctd.tcpct_cookie_desired > 0 + || ctd.tcpct_s_data_desired > 0))) {Please fix the conditional coding style, and the alignment of the lines, it's not right here.David, would indentation of 2 or 4 be preferable here?
Hi William. I think the rather significantly majority style, especially for net/... is to use || and && at the end of the line rather than the start and it should be used. Treewide: $ grep -rP --include=*.[ch] "(\|\||\&\&)\s*$" * | wc -l 34180 $ grep -rP --include=*.[ch] "^\s*(\|\||\&\&)" * | wc -l 7855 net: 3859 to 382 (more than 10:1, so it's the one to follow) drivers/net: 4610 to 666 Besides, it's the one David wants... cheers, Joe