Use ferror(3) to check for errors, rather than inspecting errno.  Thanks to
David Douthitt for reporting, and shame on me for writing such crappy code.
2 files changed