From 5452bed087d821e8f0c3ec5dda6348cbe343e9e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philipp=20T=C3=B6lke?= Date: Thu, 7 Oct 2010 05:41:50 +0000 Subject: [PATCH] Strings are char* not unsigned char * --- src/vpn/gnunet-dns-parser.c | 8 ++++---- 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 @@ #include "gnunet-dns-parser.h" #include "gnunet-vpn-packet.h" -unsigned int parse_dns_name(unsigned char* d, const unsigned char* src, unsigned short idx) {/*{{{*/ - unsigned char* dest = d; +unsigned int parse_dns_name(char* d, const unsigned char* src, unsigned short idx) {/*{{{*/ + char* dest = d; int len = src[idx++]; while (len != 0) { @@ -31,7 +31,7 @@ unsigned short parse_dns_record(unsigned char* data, struct dns_record** dst, un for (i = 0; i < count; i++) { dst[i] = GNUNET_malloc(sizeof(struct dns_record)); dst[i]->name = alloca(255); // see RFC1035 - unsigned char* name = dst[i]->name; + char* name = dst[i]->name; _idx = parse_dns_name(name, data, idx); dst[i]->namelen = _idx - idx; @@ -71,7 +71,7 @@ struct dns_pkt_parsed* parse_dns_packet(struct dns_pkt* pkt) {/*{{{*/ int i; for (i = 0; i < qdcount; i++) { /*{{{*/ ppkt->queries[i] = GNUNET_malloc(sizeof(struct dns_query)); - unsigned char* name = alloca(255); /* see RFC1035, it can't be more than this. */ + char* name = alloca(255); /* see RFC1035, it can't be more than this. */ _idx = parse_dns_name(name, pkt->data, idx); 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 { }; struct dns_query { - unsigned char* name; + char* name; unsigned char namelen; unsigned short qtype; unsigned short qclass; }; struct dns_record { - unsigned char* name; + char* name; unsigned char namelen; unsigned short type; unsigned short class; -- 2.25.1