cmp: Style and type issues.
MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: 0mp, markj
Differential Revision: https://reviews.freebsd.org/D47019
(cherry picked from commit d350e8d795d53dbc58ea428f76355cf5e28f6116)
cmp: Check the status of stdout.
POSIX requires us to print an error message and exit non-zero if
writing to stdout fails. This can only happen if sflag is unset.
MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47020
(cherry picked from commit 3c37828ee1874754e1c5e96268016113c1e02ba2)