From: Lennart Poettering Date: Mon, 2 May 2016 09:14:13 +0000 (+0200) Subject: minor CODING_STYLE clarification X-Git-Tag: v230~102^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10c6258e326f6fcc749747334de9fc1672296719;p=thirdparty%2Fsystemd.git minor CODING_STYLE clarification --- diff --git a/CODING_STYLE b/CODING_STYLE index c2b2e56d5d6..b689355c9a6 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