auth/spnego: make sure we don't return OK without sub_sec_ready in gensec_spnego_clie...
[sfrench/samba-autobuild/.git] / README.Coding
index c4e9dfebf9885575b810b875c999e913548afcfd..19a363fa1dd13d3f605fc9c009a55fae17cb79ac 100644 (file)
@@ -90,6 +90,16 @@ displaying trailing whitespace:
   set textwidth=80
   autocmd BufNewFile,BufRead *.c,*.h exec 'match Todo /\%>' . &textwidth . 'v.\+/'
 
+clang-format
+------------
+BasedOnStyle: LLVM
+IndentWidth: 8
+UseTab: true
+BreakBeforeBraces: Linux
+AllowShortIfStatementsOnASingleLine: false
+IndentCaseLabels: false
+BinPackParameters: false
+
 
 =========================
 FAQ & Statement Reference
@@ -189,7 +199,13 @@ characters or less with whitespace.  For example,
 The previous example is intended to illustrate alignment of function
 parameters across lines and not as encourage for gratuitous line
 splitting.  Never split a line before columns 70 - 79 unless you
-have a really good reason.  Be smart about formatting.
+have a really good reason. Be smart about formatting.
+
+One exception to the previous rule is function declarations and
+definitions. In function declarations and definitions, either the
+declaration is a one-liner, or each parameter is listed on its own
+line. The rationale is that if there are many parameters, each one
+should be on its own line to make tracking interface changes easier.
 
 
 If, switch, & Code blocks
@@ -374,6 +390,7 @@ it's also easier to use the "step" command within gdb.
 Good Example:
 
        char *name = NULL;
+       int ret;
 
        name = get_some_name();
        if (name == NULL) {