On Mon, Dec 15, 2014 at 5:40 PM, Lennart Poettering <[email protected]>
wrote:
>
> On Sat, 13.12.14 08:32, Matthias Urlichs ([email protected]) wrote:
>
> > Hi,
> >
> > Zbigniew Jędrzejewski-Szmek:
> > > >     wrap a few *_FOREACH macros in curly braces
> > > >
> > > cppcheck is full of errors anyway. I don't think we should make the
> code
> > > less pretty just to satisfy a checker, and a rarely used one.
> > >
> > While you may be right about cppcheck, IMHO it's good style to wrap all
> > multi-line subordinates in curlies on general principle.
>
> For the sake of brevity our CODING_STYLE docs suggest to leave out
> unnecessary curly braces. Single-line code blocks should not be
> enclosed in them, this is not PHP after all...
>

There's no difference between C and PHP in this case. Perhaps you meant
Perl or Go?

-- 
Mantas Mikulėnas <[email protected]>
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to