From: Jim Bloom Date: Sat, 26 Oct 1985 05:55:54 +0000 (-0800) Subject: Why try to be intelligent about address families too late X-Git-Tag: BSD-4_3-Snapshot-Development~4107 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/78038179fffdb094160959593a3a7467c5125cf5 Why try to be intelligent about address families too late SCCS-vsn: usr.sbin/rwhod/rwhod.c 5.6 --- 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");