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 | |
parent | abbb90a6230541803cfa1c488062bb0c1de069cf (diff) | |
download | gnunet-5452bed087d821e8f0c3ec5dda6348cbe343e9e4.tar.gz gnunet-5452bed087d821e8f0c3ec5dda6348cbe343e9e4.zip |
Strings are char* not unsigned char *
Diffstat (limited to 'src')
-rw-r--r-- | src/vpn/gnunet-dns-parser.c | 8 | ||||
-rw-r--r-- | src/vpn/gnunet-vpn-packet.h | 4 |
2 files changed, 6 insertions, 6 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; |
diff --git a/src/vpn/gnunet-vpn-packet.h b/src/vpn/gnunet-vpn-packet.h index 61f274e95..3df33a3f1 100644 --- a/src/vpn/gnunet-vpn-packet.h +++ b/src/vpn/gnunet-vpn-packet.h | |||
@@ -99,14 +99,14 @@ struct dns_pkt_parsed { | |||
99 | }; | 99 | }; |
100 | 100 | ||
101 | struct dns_query { | 101 | struct dns_query { |
102 | unsigned char* name; | 102 | char* name; |
103 | unsigned char namelen; | 103 | unsigned char namelen; |
104 | unsigned short qtype; | 104 | unsigned short qtype; |
105 | unsigned short qclass; | 105 | unsigned short qclass; |
106 | }; | 106 | }; |
107 | 107 | ||
108 | struct dns_record { | 108 | struct dns_record { |
109 | unsigned char* name; | 109 | char* name; |
110 | unsigned char namelen; | 110 | unsigned char namelen; |
111 | unsigned short type; | 111 | unsigned short type; |
112 | unsigned short class; | 112 | unsigned short class; |