diff options
Diffstat (limited to 'src/lib/libc/net/gethostnamadr.c')
-rw-r--r-- | src/lib/libc/net/gethostnamadr.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c index ec3f14a900..6d8072bd79 100644 --- a/src/lib/libc/net/gethostnamadr.c +++ b/src/lib/libc/net/gethostnamadr.c | |||
@@ -144,7 +144,7 @@ getanswer(answer, anslen, iquery) | |||
144 | if (qdcount) { | 144 | if (qdcount) { |
145 | if (iquery) { | 145 | if (iquery) { |
146 | if ((n = dn_expand((u_char *)answer->buf, | 146 | if ((n = dn_expand((u_char *)answer->buf, |
147 | (u_char *)eom, (u_char *)cp, (u_char *)bp, | 147 | (u_char *)eom, (u_char *)cp, bp, |
148 | buflen)) < 0) { | 148 | buflen)) < 0) { |
149 | h_errno = NO_RECOVERY; | 149 | h_errno = NO_RECOVERY; |
150 | return ((struct hostent *) NULL); | 150 | return ((struct hostent *) NULL); |
@@ -174,7 +174,7 @@ getanswer(answer, anslen, iquery) | |||
174 | haveanswer = 0; | 174 | haveanswer = 0; |
175 | while (--ancount >= 0 && cp < eom) { | 175 | while (--ancount >= 0 && cp < eom) { |
176 | if ((n = dn_expand((u_char *)answer->buf, (u_char *)eom, | 176 | if ((n = dn_expand((u_char *)answer->buf, (u_char *)eom, |
177 | (u_char *)cp, (u_char *)bp, buflen)) < 0) | 177 | (u_char *)cp, bp, buflen)) < 0) |
178 | break; | 178 | break; |
179 | cp += n; | 179 | cp += n; |
180 | type = _getshort(cp); | 180 | type = _getshort(cp); |
@@ -195,7 +195,7 @@ getanswer(answer, anslen, iquery) | |||
195 | } | 195 | } |
196 | if (iquery && type == T_PTR) { | 196 | if (iquery && type == T_PTR) { |
197 | if ((n = dn_expand((u_char *)answer->buf, | 197 | if ((n = dn_expand((u_char *)answer->buf, |
198 | (u_char *)eom, (u_char *)cp, (u_char *)bp, | 198 | (u_char *)eom, (u_char *)cp, bp, |
199 | buflen)) < 0) | 199 | buflen)) < 0) |
200 | break; | 200 | break; |
201 | cp += n; | 201 | cp += n; |
@@ -368,11 +368,11 @@ gethostbyaddr(addr, len, type) | |||
368 | switch (lookups[i]) { | 368 | switch (lookups[i]) { |
369 | #ifdef YP | 369 | #ifdef YP |
370 | case 'y': | 370 | case 'y': |
371 | hp = _yp_gethtbyaddr(addr, len, type); | 371 | hp = _yp_gethtbyaddr(addr); |
372 | break; | 372 | break; |
373 | #endif | 373 | #endif |
374 | case 'b': | 374 | case 'b': |
375 | n = res_query(qbuf, C_IN, T_PTR, (char *)&buf, sizeof(buf)); | 375 | n = res_query(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf)); |
376 | if (n < 0) { | 376 | if (n < 0) { |
377 | #ifdef DEBUG | 377 | #ifdef DEBUG |
378 | if (_res.options & RES_DEBUG) | 378 | if (_res.options & RES_DEBUG) |
@@ -469,7 +469,7 @@ again: | |||
469 | 469 | ||
470 | struct hostent * | 470 | struct hostent * |
471 | _gethtbyname(name) | 471 | _gethtbyname(name) |
472 | char *name; | 472 | const char *name; |
473 | { | 473 | { |
474 | register struct hostent *p; | 474 | register struct hostent *p; |
475 | register char **cp; | 475 | register char **cp; |
@@ -598,9 +598,8 @@ done: | |||
598 | } | 598 | } |
599 | 599 | ||
600 | struct hostent * | 600 | struct hostent * |
601 | _yp_gethtbyaddr(addr, len, type) | 601 | _yp_gethtbyaddr(addr) |
602 | const char *addr; | 602 | const char *addr; |
603 | int len, type; | ||
604 | { | 603 | { |
605 | struct hostent *hp = (struct hostent *)NULL; | 604 | struct hostent *hp = (struct hostent *)NULL; |
606 | static char *__ypcurrent; | 605 | static char *__ypcurrent; |