From: Lennart Poettering Date: Thu, 29 Mar 2018 14:28:00 +0000 (+0200) Subject: CODING_STYLE: two minor additions X-Git-Tag: v239~444^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46f88673729fad4df6d9d7b8e26a735648266bc5;p=thirdparty%2Fsystemd.git CODING_STYLE: two minor additions --- diff --git a/doc/CODING_STYLE b/doc/CODING_STYLE index 8ee7628051e..7025d242fa4 100644 --- a/doc/CODING_STYLE +++ b/doc/CODING_STYLE @@ -69,7 +69,7 @@ values. Do not mix usec and msec, and usec and whatnot. - Make use of _cleanup_free_ and friends. It makes your code much - nicer to read! + nicer to read (and shorter)! - Be exceptionally careful when formatting and parsing floating point numbers. Their syntax is locale dependent (i.e. "5.000" in en_US is @@ -101,7 +101,9 @@ - Do not write "foo ()", write "foo()". -- Please use streq() and strneq() instead of strcmp(), strncmp() where applicable. +- Please use streq() and strneq() instead of strcmp(), strncmp() where + applicable (i.e. wherever you just care about equality/inequality, not about + the sorting order). - Please do not allocate variables on the stack in the middle of code, even if C99 allows it. Wrong: