[pulseaudio-discuss] Coding style question regarding curly braces
Arun Raghavan
arun.raghavan at collabora.co.uk
Thu Jan 20 06:34:44 PST 2011
On Thu, 2011-01-20 at 15:03 +0200, Tanu Kaskinen wrote:
> Hi,
>
> 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?
I vote for making the convention explicit, but then I'm biased since I
prefer not putting braces around one-line conditionals. :)
Cheers,
Arun
More information about the pulseaudio-discuss
mailing list