Silence the warning about not checking fgets return value

Break the loop if fgets returns NULL (that means an EOF)
That way an infinite loop is avoided with malformed input as well. 2 examples:
`touch test_file`
`./bar < test_file`

`./bar << EOF`
`EOF`

The 2nd patch is purely cosmetic but you may not want it if you are interested in keeping git blame clean.