diff options
author | 2002-09-07 20:54:04 +0000 | |
---|---|---|
committer | 2002-09-07 20:54:04 +0000 | |
commit | 2f94bcba573124daa186f1c0e2d34302a1a6e8af (patch) | |
tree | 6a786c2d519dfefff1bae265a14cba9197a2b82c /lib/libc/net | |
parent | remove , at end of enum (diff) | |
download | wireguard-openbsd-2f94bcba573124daa186f1c0e2d34302a1a6e8af.tar.xz wireguard-openbsd-2f94bcba573124daa186f1c0e2d34302a1a6e8af.zip |
ansi pedantic. ok deraadt@
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/getrrsetbyname.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/libc/net/getrrsetbyname.c b/lib/libc/net/getrrsetbyname.c index 87ae8fc229e..1ec60486b3d 100644 --- a/lib/libc/net/getrrsetbyname.c +++ b/lib/libc/net/getrrsetbyname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getrrsetbyname.c,v 1.4 2001/08/16 18:16:43 ho Exp $ */ +/* $OpenBSD: getrrsetbyname.c,v 1.5 2002/09/07 20:54:04 jakob Exp $ */ /* * Copyright (c) 2001 Jakob Schlyter. All rights reserved. @@ -78,10 +78,10 @@ struct dns_response { struct dns_rr *additional; }; -static struct dns_response *parse_dns_response(const char *, int); -static struct dns_query *parse_dns_qsection(const char *, int, const char **, - int); -static struct dns_rr *parse_dns_rrsection(const char *, int, const char **, +static struct dns_response *parse_dns_response(const u_char *, int); +static struct dns_query *parse_dns_qsection(const u_char *, int, + const u_char **, int); +static struct dns_rr *parse_dns_rrsection(const u_char *, int, const u_char **, int); static void free_dns_query(struct dns_query *); @@ -101,7 +101,7 @@ getrrsetbyname(const char *hostname, unsigned int rdclass, struct dns_rr *rr; struct rdatainfo *rdata; unsigned int length, index_ans, index_sig; - char answer[ANSWER_BUFFER_SIZE]; + u_char answer[ANSWER_BUFFER_SIZE]; /* check for invalid class and type */ if (rdclass > 0xffff || rdtype > 0xffff) { @@ -138,7 +138,8 @@ getrrsetbyname(const char *hostname, unsigned int rdclass, #endif /* RES_USE_DNSEC */ /* make query */ - length = res_query(hostname, rdclass, rdtype, answer, sizeof(answer)); + length = res_query(hostname, (signed int) rdclass, (signed int) rdtype, + answer, sizeof(answer)); if (length < 0) { switch(h_errno) { case HOST_NOT_FOUND: @@ -280,10 +281,10 @@ freerrset(struct rrsetinfo *rrset) * DNS response parsing routines */ static struct dns_response * -parse_dns_response(const char *answer, int size) +parse_dns_response(const u_char *answer, int size) { struct dns_response *resp; - const char *cp; + const u_char *cp; /* allocate memory for the response */ resp = calloc(1, sizeof(*resp)); @@ -345,7 +346,7 @@ parse_dns_response(const char *answer, int size) } static struct dns_query * -parse_dns_qsection(const char *answer, int size, const char **cp, int count) +parse_dns_qsection(const u_char *answer, int size, const u_char **cp, int count) { struct dns_query *head, *curr, *prev; int i, length; @@ -391,7 +392,7 @@ parse_dns_qsection(const char *answer, int size, const char **cp, int count) } static struct dns_rr * -parse_dns_rrsection(const char *answer, int size, const char **cp, int count) +parse_dns_rrsection(const u_char *answer, int size, const u_char **cp, int count) { struct dns_rr *head, *curr, *prev; int i, length; |