diff options
author | deraadt <> | 1997-04-03 07:54:01 +0000 |
---|---|---|
committer | deraadt <> | 1997-04-03 07:54:01 +0000 |
commit | 855e00993d3576aedd34fffbd8fb939d1e1618e7 (patch) | |
tree | 92ce056df5942feb386890c1ad8ffbfdaa8917dc /src/lib | |
parent | 44847a3d852bdde589a683b45dfb0f0c201c0f70 (diff) | |
download | openbsd-855e00993d3576aedd34fffbd8fb939d1e1618e7.tar.gz openbsd-855e00993d3576aedd34fffbd8fb939d1e1618e7.tar.bz2 openbsd-855e00993d3576aedd34fffbd8fb939d1e1618e7.zip |
another lookup[] loop accident
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/net/gethostnamadr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c index f1c34bce06..b72118c45c 100644 --- a/src/lib/libc/net/gethostnamadr.c +++ b/src/lib/libc/net/gethostnamadr.c | |||
@@ -52,7 +52,7 @@ | |||
52 | */ | 52 | */ |
53 | 53 | ||
54 | #if defined(LIBC_SCCS) && !defined(lint) | 54 | #if defined(LIBC_SCCS) && !defined(lint) |
55 | static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.17 1997/04/03 05:53:23 deraadt Exp $"; | 55 | static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.18 1997/04/03 07:54:01 deraadt Exp $"; |
56 | #endif /* LIBC_SCCS and not lint */ | 56 | #endif /* LIBC_SCCS and not lint */ |
57 | 57 | ||
58 | #include <sys/param.h> | 58 | #include <sys/param.h> |
@@ -579,6 +579,7 @@ gethostbyname2(name, af) | |||
579 | break; | 579 | break; |
580 | } | 580 | } |
581 | } | 581 | } |
582 | /* XXX h_errno not correct in all cases... */ | ||
582 | return (hp); | 583 | return (hp); |
583 | } | 584 | } |
584 | 585 | ||
@@ -672,7 +673,7 @@ gethostbyaddr(addr, len, af) | |||
672 | break; | 673 | break; |
673 | } | 674 | } |
674 | if (!(hp = getanswer(&buf, n, qbuf, T_PTR))) | 675 | if (!(hp = getanswer(&buf, n, qbuf, T_PTR))) |
675 | return (NULL); /* h_errno was set by getanswer() */ | 676 | break; |
676 | hp->h_addrtype = af; | 677 | hp->h_addrtype = af; |
677 | hp->h_length = len; | 678 | hp->h_length = len; |
678 | bcopy(addr, host_addr, len); | 679 | bcopy(addr, host_addr, len); |
@@ -691,6 +692,7 @@ gethostbyaddr(addr, len, af) | |||
691 | break; | 692 | break; |
692 | } | 693 | } |
693 | } | 694 | } |
695 | /* XXX h_errno not correct in all cases... */ | ||
694 | return (hp); | 696 | return (hp); |
695 | } | 697 | } |
696 | 698 | ||