X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=README.Coding;h=ac9bcd43065fea7246ecddafaeac389319087628;hb=27e2b5c6c0c8daada0763fd2c90b3b17c0a68cd6;hp=ffba857a8f921c854d3ab547dfaa5c1aec71097f;hpb=396f123121ddb290f4a5536a2224aa4a651c072f;p=vlendec%2Fsamba-autobuild%2F.git diff --git a/README.Coding b/README.Coding index ffba857a8f9..ac9bcd43065 100644 --- a/README.Coding +++ b/README.Coding @@ -100,6 +100,7 @@ AllowShortIfStatementsOnASingleLine: false IndentCaseLabels: false BinPackParameters: false BinPackArguments: false +SortIncludes: false ========================= @@ -431,6 +432,22 @@ an iterator style: ... do something with opt ... } +Another exception: DBG messages for example printing a SID or a GUID: +Here we don't expect any surprise from the printing functions, and the +main reason of this guideline is to make debugging easier. That reason +rarely exists for this particular use case, and we gain some +efficiency because the DBG_ macros don't evaluate their arguments if +the debuglevel is not high enough. + + if (!NT_STATUS_IS_OK(status)) { + struct dom_sid_buf sid_buf; + struct GUID_txt_buf guid_buf; + DBG_WARNING( + "objectSID [%s] for GUID [%s] invalid\n", + dom_sid_str_buf(objectsid, &sid_buf), + GUID_buf_string(&cache->entries[idx], &guid_buf)); + } + But in general, please try to avoid this pattern.