[pulseaudio-discuss] Coding style question regarding curly braces

Tanu Kaskinen tanu.kaskinen at digia.com
Thu Jan 20 05:03:29 PST 2011


When reviewing code, should I complain about excessive curly brackets in
code like this?

    if (foo) {
        bar = 0;

Pulseaudio source code follows quite consistently the unwritten rule
that you shouldn't use curly braces unless necessary, so I was surprised
to notice that the unwritten rule was really unwritten (ie. not
mentioned in http://pulseaudio.org/wiki/CodingStyle). So, should I add
the rule to that page, or should I stop caring about this?

(As a personal preference, I actually would like to have "excessive"
curly braces, but even more than that I would like consistency.)


More information about the pulseaudio-discuss mailing list