summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-03-29 16:28:00 +0200
committerLennart Poettering <lennart@poettering.net>2018-04-03 15:22:26 +0200
commit46f88673729fad4df6d9d7b8e26a735648266bc5 (patch)
tree78915aa8666a453b5196f5f71e79df8b57d8b1bd
parent4afbb9004c4768ec4dd89fe293b688ccfea4c023 (diff)
downloadsystemd-46f88673729fad4df6d9d7b8e26a735648266bc5.tar.gz
CODING_STYLE: two minor additions
-rw-r--r--doc/CODING_STYLE6
1 files 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: