]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - CODING-STYLE
signature: do not report wrong data for pkc#7 signature
[thirdparty/kmod.git] / CODING-STYLE
index e60df9e8a733919735c007c96d18180491b26045..cab2b36089519110efade1dbf1c35347db980a91 100644 (file)
@@ -15,10 +15,12 @@ them is actually an error.  In certain circumstances one can ignore the 80
 character per line limit.  This is generally only allowed if the alternative
 would make the code even less readable.
 
-Besides the kernel coding style above, kmod coding style is havily based on
+Besides the kernel coding style above, kmod coding style is heavily based on
 oFono's and BlueZ's. Below some basic rules:
 
-1) Wrap line at 80 char limit. There are a few exceptions:
+1) Wrap line at 80 char limit.
+
+There are a few exceptions:
        - Headers may or may not wrap
        - If it's a string that is hitting the limit, it's preferred not to break
          in order to be able to grep for that string. E.g:
@@ -29,6 +31,9 @@ oFono's and BlueZ's. Below some basic rules:
        - If there's only one argument to the function, don't put it alone in a
          new line.
 
+Align the wrapped line either with tabs (BlueZ, oFono, etc) or tab + spaces
+(kernel), at your discretion. Kernel's is preferred.
+
 2) It's better to return/exit early in a function than having a really long
    "if (...) { }". Example:
 
@@ -55,3 +60,10 @@ int i = 1;  // wrong
 
 for (i = 0; i < 3; i++) {
 }
+
+4) Let the includes in the following order, separated by a new line:
+       < system headers >
+       < shared/* >
+       < libkmod >
+       < tool >
+       "local headers"