diff options
Diffstat (limited to 'Documentation/howto-contribute.txt')
-rw-r--r-- | Documentation/howto-contribute.txt | 18 |
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. |