Supplemental reading:
C coding style
Reading Valgrind errors