I have a problem with this bit of my code :
unsigned long me_hash(MEntry *me, unsigned long size){
unsigned long hashval=0;
int i=0;
for(i=0; me->surname[i];i++) hashval +=me->surname[i] + 28 * hashval;;
for(i=0; me->surname[i];i++){
if(me->postcode[i]) {
hashval += me->postcode[i] + 28 * hashval;
}
}
hashval += me->house_number;
return (hashval%size);
}
The message which I get when I run Valgrind is
==4480== Conditional jump or move depends on uninitialised value(s)
==4480== at 0x8048EB7: me_hash (mentry.c:66)
==4480== by 0x8048B3E: ml_lookup (mlist.c:91)
==4480== by 0x80488D2: main (finddupl.c:43)
==4480==
I don't know how to fix this. Could you help me?