DORMANTno replies

[PATCH] CodingGuidelines: Add a note to avoid assignments inside if()

From: Miklos Vajna <hidden>
Date: 2016-06-15 22:44:38
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Signed-off-by: Miklos Vajna <redacted>
---

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help