From: Leila Muhtasib <muhtasib@gmail.com>
To: git@vger.kernel.org
Cc: Leila Muhtasib <muhtasib@gmail.com>
Subject: [PATCH v2] CodingGuidelines: Added note about position of 'else' in C programs.
Date: Wed, 13 Jun 2012 21:42:43 -0400 [thread overview]
Message-ID: <1339638163-33870-1-git-send-email-muhtasib@gmail.com> (raw)
During code review of some patches, it was noted that 'else' should
appear on the same line as the closing '}' of its 'if' block.
Signed-off-by: Leila Muhtasib <muhtasib@gmail.com>
---
Documentation/CodingGuidelines | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 4557711..99588f0 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -123,6 +123,9 @@ For C programs:
- We try to avoid assignments inside if().
+ - "else" should be positioned on the same line as the closing
+ "}" of its "if" block.
+
- Try to make your code understandable. You may put comments
in, but comments invariably tend to stale out when the code
they were describing changes. Often splitting a function
--
1.7.7.5 (Apple Git-26)
reply other threads:[~2012-06-14 1:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339638163-33870-1-git-send-email-muhtasib@gmail.com \
--to=muhtasib@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).