add lint to makefile
make lint happy

- declare all variables at beginning of function
- use stdbool.h to specify boolean type where appropriate