git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] CodingGuidelines: Add a note to avoid assignments inside if()
@ 2008-05-22 23:26 Miklos Vajna
  2008-05-25  5:17 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Miklos Vajna @ 2008-05-22 23:26 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

I just had to ask Dscho about this. Better if it's documented, I
suppose.

 Documentation/CodingGuidelines |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 994eb91..d2a0a76 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -89,6 +89,8 @@ For C programs:
    of "else if" statements, it can make sense to add braces to
    single line blocks.
 
+ - We try to avoid assignments inside if().
+
  - 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.5.5.1.357.g1af8b.dirty

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-25  5:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 23:26 [PATCH] CodingGuidelines: Add a note to avoid assignments inside if() Miklos Vajna
2008-05-25  5:17 ` Junio C Hamano

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).