summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-04-03 07:54:01 +0000
committerderaadt <deraadt@openbsd.org>1997-04-03 07:54:01 +0000
commite2d81789743bd093a6f1875cb66f2280c8076dca (patch)
tree4409574736dbedeaadb3f807cc01f4e004722f51 /lib/libc
parentFull implementation of lookups support, plus some bug fixes. Still no YP. (diff)
downloadwireguard-openbsd-e2d81789743bd093a6f1875cb66f2280c8076dca.tar.xz
wireguard-openbsd-e2d81789743bd093a6f1875cb66f2280c8076dca.zip
another lookup[] loop accident
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/gethostnamadr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c
index f1c34bce061..b72118c45c1 100644
--- a/lib/libc/net/gethostnamadr.c
+++ b/lib/libc/net/gethostnamadr.c
@@ -52,7 +52,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.17 1997/04/03 05:53:23 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.18 1997/04/03 07:54:01 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -579,6 +579,7 @@ gethostbyname2(name, af)
break;
}
}
+ /* XXX h_errno not correct in all cases... */
return (hp);
}
@@ -672,7 +673,7 @@ gethostbyaddr(addr, len, af)
break;
}
if (!(hp = getanswer(&buf, n, qbuf, T_PTR)))
- return (NULL); /* h_errno was set by getanswer() */
+ break;
hp->h_addrtype = af;
hp->h_length = len;
bcopy(addr, host_addr, len);
@@ -691,6 +692,7 @@ gethostbyaddr(addr, len, af)
break;
}
}
+ /* XXX h_errno not correct in all cases... */
return (hp);
}