CODING_STYLE revision e1cc7a01bb4663b4aea307cf22368bb5568a9e46
71092d70af35567dd154d3de2ce04ce62e157a7cLennart Poettering
b7ff1e47da4653d2ff1ec7b489e6067fed29d8c5Lennart Poettering- 8ch indent, no tabs
c904f64d84db8c4eebedf210ba10893f19ba05edLennart Poettering
c904f64d84db8c4eebedf210ba10893f19ba05edLennart Poettering- structs in MixedCase, variables, functions in lower_case
05677bb78079c3fa0283101aac2c07581f4873f1Lennart Poettering
73090dc815390f4fca4e3ed8a7e1d3806605daaaLennart Poettering- the destructors always unregister the object from the next bigger
71092d70af35567dd154d3de2ce04ce62e157a7cLennart Poettering object, not the other way around
35c5c7a01daeb2c83c693deea07c8f2d0d6c83e2Lennart Poettering
71092d70af35567dd154d3de2ce04ce62e157a7cLennart Poettering- to minimize strict aliasing violations we prefer unions over casting
ddd88763921a1534081ed28e36f6712a85449005Lennart Poettering
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers- for robustness reasons destructors should be able to destruct
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers half-initialized objects, too
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers- error codes are returned as negative Exxx. i.e. return -EINVAL. There
9a36607584bbd1d78775353e022a51794b4e27b1Lennart Poettering are some exceptions: for constructors its is OK to return NULL on
9a36607584bbd1d78775353e022a51794b4e27b1Lennart Poettering OOM. For lookup functions NULL is fine too for "not found".
a40593a0d0d740efa387e35411e1e456a6c5aba7Lennart Poettering