diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-07-07 06:55:48 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-07-07 06:55:48 +0000 |
commit | 6e28de8050664387cb7ca410694265417df8b60d (patch) | |
tree | 0eea148c13865269419c23e5ebfef03e60c36d4d /dns.c | |
parent | 833a8c825c4df58307c3425caea35a36d718b6a9 (diff) |
fix various pointer signedness issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'dns.c')
-rw-r--r-- | dns.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -91,7 +91,7 @@ struct dn_answer { unsigned short size; } __attribute__ ((__packed__)); -static int skip_name(char *s, int len) +static int skip_name(unsigned char *s, int len) { int x = 0; @@ -116,10 +116,10 @@ static int skip_name(char *s, int len) /*! \brief Parse DNS lookup result, call callback */ static int dns_parse_answer(void *context, - int class, int type, char *answer, int len, - int (*callback)(void *context, char *answer, int len, char *fullanswer)) + int class, int type, unsigned char *answer, int len, + int (*callback)(void *context, unsigned char *answer, int len, unsigned char *fullanswer)) { - char *fullanswer = answer; + unsigned char *fullanswer = answer; struct dn_answer *ans; dns_HEADER *h; int res; @@ -192,12 +192,12 @@ not work properly, Asterisk might not start properly or a channel may lock. */ int ast_search_dns(void *context, const char *dname, int class, int type, - int (*callback)(void *context, char *answer, int len, char *fullanswer)) + int (*callback)(void *context, unsigned char *answer, int len, unsigned char *fullanswer)) { #ifdef HAS_RES_NINIT struct __res_state dnsstate; #endif - char answer[MAX_SIZE]; + unsigned char answer[MAX_SIZE]; int res, ret = -1; #ifdef HAS_RES_NINIT @@ -205,7 +205,7 @@ int ast_search_dns(void *context, memset(&dnsstate, 0, sizeof(dnsstate)); #endif res_ninit(&dnsstate); - res = res_nsearch(&dnsstate, dname, class, type, (unsigned char *)answer, sizeof(answer)); + res = res_nsearch(&dnsstate, dname, class, type, answer, sizeof(answer)); #else ast_mutex_lock(&res_lock); res_init(); |