70c1fd98e2
1. Don't force use of "for" when "while" works better. 2. No need to check c != '\0' when we also check (c == ' ' || c == '\t') 3. Use the size of the buffer we're using, rather than a different one (not really a concern, they're the same size) 4. Don't use fscanf() to read file data, use fgets() & sscanf(). 5. After using a pointer as a char *, validate alignment before switching to int * (can only fail if kernel #define gets set stupidly) Or #6... 6. Validate sparemap file name isn't too long for assigned space. 7. recognise that strlen() returns size_t - don't shove it into an int. 8. On out of mem, be more clear which allocation failed in warning msg. ATF tests all pass. But I don't think they use sparemap files.