summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-02 11:14:13 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-02 11:17:07 +0200
commit10c6258e326f6fcc749747334de9fc1672296719 (patch)
treed49e31e540646e5a1c2c2c7c05b644200a8b1b69
parent3e8a82dbd0455a3ef71095bbb0de4880d6163596 (diff)
minor CODING_STYLE clarification
-rw-r--r--CODING_STYLE5
1 files changed, 5 insertions, 0 deletions
diff --git a/CODING_STYLE b/CODING_STYLE
index c2b2e56d5d..b689355c9a 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -240,6 +240,11 @@
unlink("/foo/bar/baz");
+ Don't cast function calls to (void) that return no error
+ conditions. Specifically, the various xyz_unref() calls that return a NULL
+ object shouldn't be cast to (void), since not using the return value does not
+ hide any errors.
+
- Don't invoke exit(), ever. It is not replacement for proper error
handling. Please escalate errors up your call chain, and use normal
"return" to exit from the main function of a process. If you