Fix a typo that stopped ypset's -h option from working with a

hostname rather than an IP. The code was copying the pointer to the
IP address instead of the IP address itself. The bug has existed
ever since ypset was first imported in 1994.

PR:		bin/62550
Submitted by:	aardvark@saintaardvarkthecarpeted.com
MFC after:	1 week
This commit is contained in:
Ian Dowse 2004-02-09 00:10:18 +00:00
parent 7cb9663b27
commit 1a04497345
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125613

View File

@ -134,7 +134,7 @@ main(int argc, char *argv[])
hent = gethostbyname(optarg);
if (hent == NULL)
errx(1, "host %s unknown", optarg);
bcopy(&hent->h_addr_list[0], &sin.sin_addr,
bcopy(hent->h_addr_list[0], &sin.sin_addr,
sizeof sin.sin_addr);
}
break;