diff options
author | Kenneth G Raeburn <raeburn@mit.edu> | 1990-11-16 06:07:46 +0000 |
---|---|---|
committer | Kenneth G Raeburn <raeburn@mit.edu> | 1990-11-16 06:07:46 +0000 |
commit | 9773e29258b6bb13a34ea37e59da591d6cf12659 (patch) | |
tree | 97f14ee79ad66a8c5f4ed70db3da198f13fd6067 /lib/ZLocations.c | |
parent | 5b66b7562297c24c1e3caa32be756a240cddb55f (diff) |
If gethostbyname returns no info, use best guess for the hostname.
Diffstat (limited to 'lib/ZLocations.c')
-rw-r--r-- | lib/ZLocations.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/ZLocations.c b/lib/ZLocations.c index b7d5d1a..8c8a958 100644 --- a/lib/ZLocations.c +++ b/lib/ZLocations.c @@ -95,9 +95,7 @@ Z_SendLocation(class, opcode, auth, format) return (errno); hent = gethostbyname(host); - if (!hent) - (void) strcpy(host, "unknown"); - else + if (hent) (void) strcpy(host, hent->h_name); bptr[0] = host; #ifdef X11 |