From 78038179fffdb094160959593a3a7467c5125cf5 Mon Sep 17 00:00:00 2001 From: Jim Bloom Date: Fri, 25 Oct 1985 21:55:54 -0800 Subject: [PATCH] Why try to be intelligent about address families too late SCCS-vsn: usr.sbin/rwhod/rwhod.c 5.6 --- usr/src/usr.sbin/rwhod/rwhod.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/usr/src/usr.sbin/rwhod/rwhod.c b/usr/src/usr.sbin/rwhod/rwhod.c index dfa029a05c..e4d7a8f389 100644 --- a/usr/src/usr.sbin/rwhod/rwhod.c +++ b/usr/src/usr.sbin/rwhod/rwhod.c @@ -11,7 +11,7 @@ char copyright[] = #endif not lint #ifndef lint -static char sccsid[] = "@(#)rwhod.c 5.5 (Berkeley) %G%"; +static char sccsid[] = "@(#)rwhod.c 5.6 (Berkeley) %G%"; #endif not lint #include @@ -86,7 +86,6 @@ main() struct sockaddr_in from; char path[64]; int addr, on = 1; - struct hostent *hp; char *cp; extern char *index(); @@ -146,12 +145,6 @@ main() syslog(LOG_ERR, "setsockopt SO_BROADCAST: %m"); exit(1); } - hp = gethostbyname(myname); - if (hp == NULL) { - syslog(LOG_ERR, "%s: don't know my own name", myname); - exit(1); - } - sin.sin_family = hp->h_addrtype; sin.sin_port = sp->s_port; if (bind(s, &sin, sizeof (sin)) < 0) { syslog(LOG_ERR, "bind: %m"); -- 2.20.1