summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/howto-contribute.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/howto-contribute.txt b/Documentation/howto-contribute.txt
index e70467bbd..098f456be 100644
--- a/Documentation/howto-contribute.txt
+++ b/Documentation/howto-contribute.txt
@@ -98,3 +98,21 @@ Various notes
* Patches relying on features that are not in Linus' tree
are not accepted.
+
+ * Do not use `else' after non-returning functions. For
+ example
+
+ if (this)
+ err(EXIT_FAIL, "this failed");
+ else
+ err(EXIT_FAIL, "that failed");
+
+ is wrong and should be wrote
+
+ if (this)
+ err(EXIT_FAIL, "this failed");
+ err(EXIT_FAIL, "that failed");
+
+ * When you use if shortshort hand make sure it is not wrapped to
+ multiple lines. In case the shorthand does not look good on one
+ line use normal "if () else" syntax.