diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/net/getnetnamadr.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/lib/libc/net/getnetnamadr.c b/src/lib/libc/net/getnetnamadr.c index 149216ffd8..42410264b1 100644 --- a/src/lib/libc/net/getnetnamadr.c +++ b/src/lib/libc/net/getnetnamadr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: getnetnamadr.c,v 1.23 2003/06/03 21:09:00 deraadt Exp $ */ | 1 | /* $OpenBSD: getnetnamadr.c,v 1.24 2005/03/25 13:24:12 otto Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1997, Jason Downs. All rights reserved. | 4 | * Copyright (c) 1997, Jason Downs. All rights reserved. |
| @@ -66,7 +66,7 @@ static char sccsid[] = "@(#)getnetbyaddr.c 8.1 (Berkeley) 6/4/93"; | |||
| 66 | static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03"; | 66 | static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03"; |
| 67 | static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; | 67 | static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; |
| 68 | #else | 68 | #else |
| 69 | static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.23 2003/06/03 21:09:00 deraadt Exp $"; | 69 | static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.24 2005/03/25 13:24:12 otto Exp $"; |
| 70 | #endif | 70 | #endif |
| 71 | #endif /* LIBC_SCCS and not lint */ | 71 | #endif /* LIBC_SCCS and not lint */ |
| 72 | 72 | ||
| @@ -111,15 +111,12 @@ typedef union { | |||
| 111 | } align; | 111 | } align; |
| 112 | 112 | ||
| 113 | static struct netent * | 113 | static struct netent * |
| 114 | getnetanswer(answer, anslen, net_i) | 114 | getnetanswer(querybuf *answer, int anslen, int net_i) |
| 115 | querybuf *answer; | ||
| 116 | int anslen; | ||
| 117 | int net_i; | ||
| 118 | { | 115 | { |
| 119 | 116 | ||
| 120 | register HEADER *hp; | 117 | HEADER *hp; |
| 121 | register u_char *cp; | 118 | u_char *cp; |
| 122 | register int n; | 119 | int n; |
| 123 | u_char *eom; | 120 | u_char *eom; |
| 124 | int type, class, ancount, qdcount, haveanswer, i, nchar; | 121 | int type, class, ancount, qdcount, haveanswer, i, nchar; |
| 125 | char aux1[MAXHOSTNAMELEN], aux2[MAXHOSTNAMELEN], ans[MAXHOSTNAMELEN]; | 122 | char aux1[MAXHOSTNAMELEN], aux2[MAXHOSTNAMELEN], ans[MAXHOSTNAMELEN]; |
| @@ -250,9 +247,7 @@ getnetanswer(answer, anslen, net_i) | |||
| 250 | } | 247 | } |
| 251 | 248 | ||
| 252 | struct netent * | 249 | struct netent * |
| 253 | getnetbyaddr(net, net_type) | 250 | getnetbyaddr(in_addr_t net, int net_type) |
| 254 | register in_addr_t net; | ||
| 255 | register int net_type; | ||
| 256 | { | 251 | { |
| 257 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); | 252 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); |
| 258 | unsigned int netbr[4]; | 253 | unsigned int netbr[4]; |
| @@ -342,8 +337,7 @@ getnetbyaddr(net, net_type) | |||
| 342 | } | 337 | } |
| 343 | 338 | ||
| 344 | struct netent * | 339 | struct netent * |
| 345 | getnetbyname(net) | 340 | getnetbyname(const char *net) |
| 346 | register const char *net; | ||
| 347 | { | 341 | { |
| 348 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); | 342 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); |
| 349 | int anslen; | 343 | int anslen; |
