sync up with domestic fixes

This commit is contained in:
jtk 1996-03-24 22:03:48 +00:00
parent c241e89a6f
commit d03349ad69
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: commands.c,v 1.13 1996/02/28 21:03:53 thorpej Exp $ */
/* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */
/*
* Copyright (c) 1988, 1990, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95";
#else
static char rcsid[] = "$NetBSD: commands.c,v 1.13 1996/02/28 21:03:53 thorpej Exp $";
static char rcsid[] = "$NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $";
#endif
#endif /* not lint */
@ -2170,7 +2170,11 @@ tn(argc, argv)
if (temp != INADDR_NONE) {
sin.sin_addr.s_addr = temp;
sin.sin_family = AF_INET;
(void) strcpy(_hostname, hostp);
host = gethostbyaddr((char *)&temp, sizeof(temp), AF_INET);
if (host)
(void) strcpy(_hostname, host->h_name);
else
(void) strcpy(_hostname, hostp);
hostname = _hostname;
} else {
host = gethostbyname(hostp);