Invalid pointer? why?


#1

im making a new statusmap.c and when i use this fuction,

find_hoststatus(temp_host->name);

it returns an NULL pointer…
this is how i used it:

host *temp_host;
hoststatus *temp_hoststatus;

for(temp_host=host_list;temp_host!=NULL;temp_host=temp_host->next){
temp_hoststatus=find_hoststatus(temp_host->name);

do i need anything else to make the fuction find_hoststatus work properly? i cant see anything wrong in the code i wrote in statusmap.c since its all based on the original.