From 0b0b8cd7c2c3df72fc3959805b035e55e1bb1270 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 23 May 2008 01:26:09 +0200 Subject: [PATCH] CodingGuidelines: Add a note to avoid assignments inside if() Signed-off-by: Miklos Vajna Signed-off-by: Junio C Hamano --- Documentation/CodingGuidelines | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 994eb9159..d2a0a76e6 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 -- 2.26.2