diff options
author | Philipp Tölke <toelke@in.tum.de> | 2010-10-07 05:41:50 +0000 |
---|---|---|
committer | Philipp Tölke <toelke@in.tum.de> | 2010-10-07 05:41:50 +0000 |
commit | 5452bed087d821e8f0c3ec5dda6348cbe343e9e4 (patch) | |
tree | 3722ce7201f2bf1ccbb004aa021310190d6bd9b7 /src/vpn/gnunet-dns-parser.c | |
parent | abbb90a6230541803cfa1c488062bb0c1de069cf (diff) | |
download | gnunet-5452bed087d821e8f0c3ec5dda6348cbe343e9e4.tar.gz gnunet-5452bed087d821e8f0c3ec5dda6348cbe343e9e4.zip |
Strings are char* not unsigned char *
Diffstat (limited to 'src/vpn/gnunet-dns-parser.c')
-rw-r--r-- | src/vpn/gnunet-dns-parser.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vpn/gnunet-dns-parser.c b/src/vpn/gnunet-dns-parser.c index ae0e24044..7b81f6da4 100644 --- a/src/vpn/gnunet-dns-parser.c +++ b/src/vpn/gnunet-dns-parser.c | |||
@@ -2,8 +2,8 @@ | |||
2 | #include "gnunet-dns-parser.h" | 2 | #include "gnunet-dns-parser.h" |
3 | #include "gnunet-vpn-packet.h" | 3 | #include "gnunet-vpn-packet.h" |
4 | 4 | ||
5 | unsigned int parse_dns_name(unsigned char* d, const unsigned char* src, unsigned short idx) {/*{{{*/ | 5 | unsigned int parse_dns_name(char* d, const unsigned char* src, unsigned short idx) {/*{{{*/ |
6 | unsigned char* dest = d; | 6 | char* dest = d; |
7 | 7 | ||
8 | int len = src[idx++]; | 8 | int len = src[idx++]; |
9 | while (len != 0) { | 9 | while (len != 0) { |
@@ -31,7 +31,7 @@ unsigned short parse_dns_record(unsigned char* data, struct dns_record** dst, un | |||
31 | for (i = 0; i < count; i++) { | 31 | for (i = 0; i < count; i++) { |
32 | dst[i] = GNUNET_malloc(sizeof(struct dns_record)); | 32 | dst[i] = GNUNET_malloc(sizeof(struct dns_record)); |
33 | dst[i]->name = alloca(255); // see RFC1035 | 33 | dst[i]->name = alloca(255); // see RFC1035 |
34 | unsigned char* name = dst[i]->name; | 34 | char* name = dst[i]->name; |
35 | 35 | ||
36 | _idx = parse_dns_name(name, data, idx); | 36 | _idx = parse_dns_name(name, data, idx); |
37 | dst[i]->namelen = _idx - idx; | 37 | dst[i]->namelen = _idx - idx; |
@@ -71,7 +71,7 @@ struct dns_pkt_parsed* parse_dns_packet(struct dns_pkt* pkt) {/*{{{*/ | |||
71 | int i; | 71 | int i; |
72 | for (i = 0; i < qdcount; i++) { /*{{{*/ | 72 | for (i = 0; i < qdcount; i++) { /*{{{*/ |
73 | ppkt->queries[i] = GNUNET_malloc(sizeof(struct dns_query)); | 73 | ppkt->queries[i] = GNUNET_malloc(sizeof(struct dns_query)); |
74 | unsigned char* name = alloca(255); /* see RFC1035, it can't be more than this. */ | 74 | char* name = alloca(255); /* see RFC1035, it can't be more than this. */ |
75 | 75 | ||
76 | _idx = parse_dns_name(name, pkt->data, idx); | 76 | _idx = parse_dns_name(name, pkt->data, idx); |
77 | ppkt->queries[i]->namelen = _idx - idx; | 77 | ppkt->queries[i]->namelen = _idx - idx; |