[Swan] initial thoughts on uncrustifying libreswan

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Fri May 24 17:04:20 EEST 2013


On Thu, May 23, 2013 at 05:21:09PM -0400, Paul Wouters wrote:
> On Thu, 23 May 2013, Richard Guy Briggs wrote:
> 
> >>I also hate opening braces being on their own line.  Waste of screen
> >>space. :)
> >
> >I'm with Len on this.
> 
> What I've tried to stick to is to use the braces on the same lines for
> small bits of codes:
> 
> 	if (foo) {
> 		bar();
> 	}
> 
> but use braces on their own line when the block is introducing new
> variables.
> 
> 	if (foo)
> 	{
> 		struct thing;
> 
> 		thing = alloc_bytes(foo, "stuff");
> 		[...]
> 	}

Why make an exception?  Now if you come along and need to add a new
variable to a block later, you have to move the braces to follow some
weird arbitrary exception?  Why make it different?

I never have understood why the kernel style puts the '{' on a new line
for function declarations, but not for other places.

-- 
Len Sorensen


More information about the Swan mailing list