Rigorous resource management in C
https://sgauthier.fr/blog/rigourous_c_coding.html
- returned status ought to be checked, especially: malloc, realloc, fopen. For read/write, check errno.
- assignments evaluate to the value they assign:
(a = 3) == 3
- C is guaranteed to evaluate lazily left-to-right
(a, b, c)
evaluates to c
- structure a function as: resource allocation, resource usage, resource clean up