From 46f88673729fad4df6d9d7b8e26a735648266bc5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 29 Mar 2018 16:28:00 +0200 Subject: [PATCH] CODING_STYLE: two minor additions --- doc/CODING_STYLE | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/CODING_STYLE b/doc/CODING_STYLE index 8ee7628051..7025d242fa 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: -- 2.25.1