lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 30 Apr 2007 14:34:12 -0700
From:	"Luck, Tony" <tony.luck@...el.com>
To:	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Christoph Hellwig" <hch@...radead.org>
CC:	"Roland McGrath" <roland@...hat.com>,
	"Christoph Hellwig" <hch@....de>, <linux-kernel@...r.kernel.org>,
	<linux-arch@...r.kernel.org>
Subject: RE: condingstyle, was Re: utrace comments

> I'm a bit lost here.  Are we referring to
>
>	if (expr) {
>		...
>	} else {
>		...
>	}
>
> versus
>
>	if (expr) {
>		...
>	}
>	else {
>		...
>	}

This one is already covered by Documentation/CodingStyle (with the Justification
that this is the way that K&R do it, so it must be right).

> This is
>
>	if (expr1 &&
>		expr2)
>
> versus
>
>	if (expr1
>		&& expr2)

This isn't covered ... CodingStyle merely says that long lines
should be broken into "sensible chunks".  Perhaps we should add
some words about breaking long lines leaving binary operators
trailing on the end of the line (my preferred style).  But the
only examples of this I could find leafing through K&R they
put the binary operator on the start of the continuation line
(could the prophets have been wrong here :-)

-Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ