aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-07-14 13:08:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-07-14 13:08:50 +0000
commit88ce03e94507d009edb0bb80e778fb8ad69eb6ac (patch)
tree5d0be0afb617d293d034e4628b603d283916d09f /ares
parent5bed99c97da7fcbd1c832074dc73efefee81a94c (diff)
Vlad Dinulescu fixed two outstanding valgrind reports
Diffstat (limited to 'ares')
-rw-r--r--ares/CHANGES4
-rw-r--r--ares/ares_init.c2
-rw-r--r--ares/ares_process.c3
-rw-r--r--ares/ares_query.c2
4 files changed, 8 insertions, 3 deletions
diff --git a/ares/CHANGES b/ares/CHANGES
index cb7e81ecb..fcebe4ea4 100644
--- a/ares/CHANGES
+++ b/ares/CHANGES
@@ -1,5 +1,9 @@
Changelog for the c-ares project
+* July 14 2007 (Daniel Stenberg)
+
+- Vlad Dinulescu fixed two outstanding valgrind reports.
+
Version 1.4.0 (June 8, 2007)
* June 4 2007 (Daniel Stenberg)
diff --git a/ares/ares_init.c b/ares/ares_init.c
index f6018c90c..bc6a0ea6b 100644
--- a/ares/ares_init.c
+++ b/ares/ares_init.c
@@ -1341,7 +1341,7 @@ static void init_id_key(rc4_key* key,int key_data_len)
short ares__generate_new_id(rc4_key* key)
{
- short r;
+ short r=0;
ares__rc4(key, (unsigned char *)&r, sizeof(r));
return r;
}
diff --git a/ares/ares_process.c b/ares/ares_process.c
index 745fe682a..e8b9ef6fa 100644
--- a/ares/ares_process.c
+++ b/ares/ares_process.c
@@ -400,7 +400,8 @@ static void process_timeouts(ares_channel channel, time_t now)
static void process_answer(ares_channel channel, unsigned char *abuf,
int alen, int whichserver, int tcp, time_t now)
{
- int id, tc, rcode;
+ int tc, rcode;
+ unsigned short id;
struct query *query;
/* If there's no room in the answer for a header, we can't do much
diff --git a/ares/ares_query.c b/ares/ares_query.c
index ed32e9288..0cd655709 100644
--- a/ares/ares_query.c
+++ b/ares/ares_query.c
@@ -67,7 +67,7 @@ void ares__rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len)
static struct query* find_query_by_id(ares_channel channel, int id)
{
- int qid;
+ unsigned short qid;
struct query* q;
DNS_HEADER_SET_QID(((unsigned char*)&qid), id);