diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-01-08 13:06:14 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-01-08 13:06:14 +0000 |
commit | 07a7a2c487eb6327c0d251d29e13ced39d87ba07 (patch) | |
tree | b7f48d87f9a53795a83718783d1a6fc2b1e87bf3 /lib/libc | |
parent | ca4967cbdae3664f091bf22a96cff8b34c90dee5 (diff) | |
download | src-07a7a2c487eb6327c0d251d29e13ced39d87ba07.tar.gz src-07a7a2c487eb6327c0d251d29e13ced39d87ba07.zip |
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/gethostbydns.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c index 9a07a45ee4f6..f77e0134fe68 100644 --- a/lib/libc/net/gethostbydns.c +++ b/lib/libc/net/gethostbydns.c @@ -56,7 +56,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93"; static char fromrcsid[] = "From: Id: gethnamaddr.c,v 8.20 1996/09/28 06:51:07 vixie Exp"; -static char rcsid[] = "$Id: gethostbydns.c,v 1.16 1996/12/30 13:18:37 peter Exp $"; +static char rcsid[] = "$Id: gethostbydns.c,v 1.17 1997/01/05 17:26:09 ache Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -497,12 +497,8 @@ _gethostbydnsname(name, af) if (!isdigit(*cp) && *cp != '.') break; } -/* - * XXX: isxdigit(name[0]) gives false failures on short names which looks - * like hexadecimal digits, f.e. "fade", "babe", "d133", etc. - */ -#if 0 - if (isxdigit(name[0]) || name[0] == ':') + if ((isxdigit(name[0]) && strchr(name, ':') != NULL) || + name[0] == ':') for (cp = name;; ++cp) { if (!*cp) { if (*--cp == '.') @@ -532,7 +528,7 @@ _gethostbydnsname(name, af) if (!isxdigit(*cp) && *cp != ':' && *cp != '.') break; } -#endif /* XXX */ + if ((n = res_search(name, C_IN, type, buf.buf, sizeof(buf))) < 0) { dprintf("res_search failed (%d)\n", n); return (NULL); |