diff options
Diffstat (limited to 'resolv/gethnamaddr.c')
-rw-r--r-- | resolv/gethnamaddr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index 1cae1f7295..7c3096c967 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -341,12 +341,11 @@ getanswer(answer, anslen, qname, qtype) cp += n; continue; /* XXX - had_error++ ? */ } - if (haveanswer) { - if (n != host.h_length) { - cp += n; - continue; - } - } else { + if (n != host.h_length) { + cp += n; + continue; + } + if (!haveanswer) { register int nn; host.h_name = bp; |