Improve upon previous commit:
1.  Check return of mmap(2) (*)
2.  Avoid FD leak when fstat fails.
3.  Fix style(9).

(*) Pointed out by jmg@