Unused Variables Removed
Prefer Preincrement/Decrement
sscanf() to prevent overflow
strncpy() '\0' terminated
C style pointer casting
Reducing the scope of variables