X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=CODING_STYLE;h=a96ddd35980fd11aa2cf81edfee01f77d1f1a496;hp=dbadfbdb5441adf3ae53a0ebec458bf2726cd151;hb=ba5bb9837fda291f45cffa97fe8347e045a93694;hpb=1cfc78c91965df340cdde100ad6cb3ed50b28927 diff --git a/CODING_STYLE b/CODING_STYLE index dbadfbdb5..a96ddd359 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -314,3 +314,10 @@ are always defined after more global ones. Thus, our local definitions will never "leak" into the global header files, possibly altering their effect due to #ifdeffery. + +- To implement an endless loop, use "for (;;)" rather than "while + (1)". The latter is a bit ugly anyway, since you probably really + meant "while (true)"... To avoid the discussion what the right + always-true expression for an infinite while() loop is our + recommendation is to simply write it without any such expression by + using "for (;;)".