Re: [PATCH] Add Documentation/CodingStyle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-11-06 at 17:17, Johannes Schindelin wrote:

> +
> + - Do not use curly brackets unnecessarily.  I.e.
> +
> +	if (bla) {
> +		x = 1;
> +	}

In my opinion, I think this is a bad guideline.

> +   is frowned upon.  A gray area is when the statement extends over a
> +   few lines, and/or you have a lengthy comment atop of it.

Or if it is some macro, or any number of vague problem areas.

Again, in my opinion, one should always take the safer
defensive programming tactic and always use braces.
Having them really never produces errors, while omitting
them is often error prone.

Yes, I know that is not a popular opinion by example,
but I'm still allowed to state it. :-)
Feel free to ignore me as well. :-)

jdl


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux