From 1a044973456ad91492769419212d259696ec5fb2 Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Mon, 9 Feb 2004 00:10:18 +0000 Subject: [PATCH] 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 --- usr.sbin/ypset/ypset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ypset/ypset.c b/usr.sbin/ypset/ypset.c index 455b27378f6c..1296f3946fad 100644 --- a/usr.sbin/ypset/ypset.c +++ b/usr.sbin/ypset/ypset.c @@ -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;