Minor style nit noticed by bde.

This commit is contained in:
Warner Losh 1997-12-24 00:59:02 +00:00
parent 164309e22e
commit b10d9d5f10
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31956

View File

@ -45,7 +45,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
*/
static const char rcsid[] =
"$Id: ping.c,v 1.27 1997/08/07 02:41:15 julian Exp $";
"$Id: ping.c,v 1.28 1997/08/11 04:33:07 fenner Exp $";
#endif /* not lint */
/*
@ -334,7 +334,7 @@ main(argc, argv)
errx(1,"gethostbyname2 returned an illegal address");
memcpy(&to->sin_addr, hp->h_addr_list[0], sizeof to->sin_addr);
(void)strncpy(hnamebuf, hp->h_name, sizeof(hnamebuf) - 1);
hnamebuf[(sizeof hnamebuf) - 1] = '\0';
hnamebuf[sizeof(hnamebuf) - 1] = '\0';
hostname = hnamebuf;
}