[libvirt] [PATCH] maint: document dislike of mismatched if/else bracing
Daniel P. Berrange
berrange at redhat.com
Wed Jan 5 18:20:45 UTC 2011
On Wed, Jan 05, 2011 at 11:07:28AM -0700, Eric Blake wrote:
> * docs/hacking.html.in (Curly braces): Tighten recommendations to
> disallow if (cond) one-line; else { block; }.
> * HACKING: Regenerate.
> Suggested by Daniel P. Berrange.
> ---
>
> > > since HACKING documents that an else clause should only ever omit braces
> > > when the if clause also omitted braces, but an if clause can omit braces
> > > even when the else clause requires them.
> > Hmm, I didn't notice that. I really don't like to see braces in
> > else clauses, without also seeing braces in the if, and have
> > been fixing this to add braces whenever I come across it.
>
> Fine by me - how does this look?
Looks good to me.
Daniel
More information about the libvir-list
mailing list