Browse code

dns_cache.c: fix compiler warnings - warning√Ęsr_sums[*].r_sum may be used uninitialized in this function [-Wuninitialized] - warning√Ęsr_sums[*].rr may be used uninitialized in this function [-Wuninitialized]

Ovidiu Sas authored on 18/04/2013 18:09:09
Showing 1 changed files
... ...
@@ -2306,6 +2306,7 @@ inline static struct dns_rr* dns_srv_get_nxt_rr(struct dns_hash_entry* e,
2306 2306
 	servers_up = atomic_get(dns_servers_up);
2307 2307
 #endif
2308 2308
 
2309
+	memset(r_sums, 0, sizeof(struct r_sums_entry) * MAX_SRV_GRP_IDX);
2309 2310
 	rand_w=0;
2310 2311
 	for(rr=e->rr_lst, n=0;rr && (n<*no);rr=rr->next, n++);/* skip *no records*/
2311 2312