Vlad Dinulescu fixed two outstanding valgrind reports

pull/1/head
Daniel Stenberg 18 years ago
parent 1c91a98fcd
commit 403b315a3b
  1. 4
      CHANGES
  2. 2
      ares_init.c
  3. 3
      ares_process.c
  4. 2
      ares_query.c

@ -1,5 +1,9 @@
Changelog for the c-ares project 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) Version 1.4.0 (June 8, 2007)
* June 4 2007 (Daniel Stenberg) * June 4 2007 (Daniel Stenberg)

@ -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 ares__generate_new_id(rc4_key* key)
{ {
short r; short r=0;
ares__rc4(key, (unsigned char *)&r, sizeof(r)); ares__rc4(key, (unsigned char *)&r, sizeof(r));
return r; return r;
} }

@ -400,7 +400,8 @@ static void process_timeouts(ares_channel channel, time_t now)
static void process_answer(ares_channel channel, unsigned char *abuf, static void process_answer(ares_channel channel, unsigned char *abuf,
int alen, int whichserver, int tcp, time_t now) int alen, int whichserver, int tcp, time_t now)
{ {
int id, tc, rcode; int tc, rcode;
unsigned short id;
struct query *query; struct query *query;
/* If there's no room in the answer for a header, we can't do much /* If there's no room in the answer for a header, we can't do much

@ -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) static struct query* find_query_by_id(ares_channel channel, int id)
{ {
int qid; unsigned short qid;
struct query* q; struct query* q;
DNS_HEADER_SET_QID(((unsigned char*)&qid), id); DNS_HEADER_SET_QID(((unsigned char*)&qid), id);

Loading…
Cancel
Save