From f3d6fdae84308098a438254c8530fc52677efe57 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 23 Jun 2015 07:45:36 +1000 Subject: Extend CODING_STYLE with the if/else requirements Signed-off-by: Peter Hutterer --- CODING_STYLE | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CODING_STYLE b/CODING_STYLE index 1a64ffe6..3648a4e2 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -62,6 +62,17 @@ useit(c); } +- if/else: { on the same line, no curly braces if both blocks are a single + statement. If either if or else block are multiple statements, both must + have curly braces. + + if (foo) { + blah(); + bar(); + } else { + a = 10; + } + - public functions MUST be doxygen-commented, use doxygen's @foo rather than \foo notation -- cgit v1.2.3