- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
Include appropriate header files to bring prototypes into scope.
Enlarge buffer used for tempfile name -- were trying to stuff ~20
chars into a 15 char buffer.