summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-11-10 17:46:09 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-11-10 17:46:09 +0000
commit927d0282233d4e30b9a50904a992e320c10adf0c (patch)
treecafff7e5d806dbc953df704d1f4aa76e4684e458
parent5c6d1a27a1486c8d2084307633e03320a43bdd74 (diff)
tiny fix on getaddrinfo error handling
-rw-r--r--libexec/rlogind/rlogind.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index 74fe93dbf2c..80092d56224 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/* from: static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; */
-static char *rcsid = "$Id: rlogind.c,v 1.24 2000/03/09 15:03:29 deraadt Exp $";
+static char *rcsid = "$Id: rlogind.c,v 1.25 2000/11/10 17:46:08 itojun Exp $";
#endif /* not lint */
/*
@@ -255,9 +255,8 @@ doit(f, fromp)
hints.ai_family = fromp->sa_family;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_CANONNAME;
+ res0 = NULL;
gaierror = getaddrinfo(hostname, "0", &hints, &res0);
- if (gaierror)
- res0 = NULL;
for (res = res0; good == 0 && res; res = res->ai_next) {
if (res->ai_family != fromp->sa_family)
continue;