Invalid pointer? why?


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


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

host *temp_host;
hoststatus *temp_hoststatus;


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.