Remove test conditional that will always evaluate to false.
Remove implicit conversions that lose precision.
Move common #define's into an enum.
Remove more implicit casts that lost precision; declared function parameters as void if no function arguments were taken in.
Change compiler standard to C11 and add optimization level 3 to the flags.
Simplify NULL checks.
Declare counter variables within for loops for lowest scope.