I don't really see how a well-coded C function can be used for something other than it's purpose...
Originally Posted by Nobu
For instance, I just took a random function in one of the latest commits : http://cgit.freedesktop.org/systemd/...rtnl-message.c
Let's have a look at . I'm not expert coder (and I really prefer the static correctness you can get from C++), but from what I can see :
- Every function call's return is checked
- There are asserts for case where it may go wrong
So there certainly might be corner case bugs or missing asserts, but to me the code seems good and the functions seems to have well defined invariants. I just find the documentation lacking however (but I looked on other files and it seems they prefer to document everything on the wiki : http://www.freedesktop.org/wiki/Soft...journal-files/ is referred in journal-*.h for instance)...
There are also good tests : http://cgit.freedesktop.org/systemd/...nl/test-rtnl.c
And I suppose it's the case for other modules.