summaryrefslogtreecommitdiff
path: root/CODING_STYLE
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-10-07 15:32:42 +0200
committerDaniel Mack <github@zonque.org>2015-10-07 15:32:42 +0200
commit79bec997c911be7c903db9f7e5d07ab2cd303ed7 (patch)
tree1e6e62138a8920a3210b8063157612b484efbea6 /CODING_STYLE
parentf74431288aec78ffdd05be9a519eab3dbe1c4f81 (diff)
parente287086b8aa2558356af225a12d9bfea8e7d61ca (diff)
Merge pull request #1484 from poettering/ask-pass-kernel-keyring
cache harddisk passwords in the kernel keyring
Diffstat (limited to 'CODING_STYLE')
-rw-r--r--CODING_STYLE6
1 files changed, 5 insertions, 1 deletions
diff --git a/CODING_STYLE b/CODING_STYLE
index cf86de5f62..7fd4af8b87 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -332,9 +332,13 @@
- Avoid leaving long-running child processes around, i.e. fork()s that
are not followed quickly by an execv() in the child. Resource
management is unclear in this case, and memory CoW will result in
- penalties in the parent much much later on.
+ unexpected penalties in the parent much much later on.
- Don't block execution for arbitrary amounts of time using usleep()
or a similar call, unless you really know what you do. Just "giving
something some time", or so is a lazy excuse. Always wait for the
proper event, instead of doing time-based poll loops.
+
+- To determine the length of a constant string "foo", don't bother
+ with sizeof("foo")-1, please use strlen("foo") directly. gcc knows
+ strlen() anyway and turns it into a constant expression if possible.