summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypset
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2004-02-09 00:10:18 +0000
committeriedowse <iedowse@FreeBSD.org>2004-02-09 00:10:18 +0000
commit364ec931161072812aa7ec5a5cdab0878dd97e12 (patch)
treec277f7441e577021cf2d6763adfe1f4398b01c42 /usr.sbin/ypset
parent6f2d2e36e047d8788d5ede826905811d29e5edf7 (diff)
downloadFreeBSD-src-364ec931161072812aa7ec5a5cdab0878dd97e12.zip
FreeBSD-src-364ec931161072812aa7ec5a5cdab0878dd97e12.tar.gz
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
Diffstat (limited to 'usr.sbin/ypset')
-rw-r--r--usr.sbin/ypset/ypset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/ypset/ypset.c b/usr.sbin/ypset/ypset.c
index 455b273..1296f39 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;
OpenPOWER on IntegriCloud