The return value from `fread()` doesn’t actually indicate whether the
read failed due to EOF or due to a read error.
Rework the code so that errors are reported correctly, EOF is handled
silently, and as a byproduct, blank lines in the input file are ignored
and skipped over.
Spotted by scan-build.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>