chiark / gitweb /
when shortcutting states do not skip state transitions
[elogind.git] / CODING_STYLE
1
2 - 8ch indent, no tabs
3
4 - structs in MixedCase, variables, functions in lower_case
5
6 - the destructors always unregister the object from the next bigger
7   object, not the other way around
8
9 - to minimize strict aliasing violations we prefer unions over casting
10
11 - for robustness reasons destructors should be able to destruct
12   half-initialized objects, too
13
14 - error codes are returned as negative Exxx. i.e. return -EINVAL. There
15   are some exceptions: for constructors its is OK to return NULL on
16   OOM. For lookup functions NULL is fine too for "not found".