conflicting types for a function return in C
- by Adi
Hi all,
Here is my question :
I am doing a recursive program and I am getting an error saying conflicting types:
Code is :
void* buddyMalloc(int req_size)
{
//Do something here//
return buddy_findout(original_index,req_size); //This is the recursive fn I call//
}
void *buddy_findout(int current_index,int req_size)
{
char *selected = NULL;
if(front!=NULL)
{
if(current_index==original_index)
{
//Do something here//
return selected ; //
}
else
{
//Do Something here//
return buddy_findout(current_index+1,req_size);
}
}
else
{
return buddy_findout(current_index-1,req_size);
}
}
In the above code , "I am getting error like : conflicting types of buddy_findout "
Thanks for the help in advance
aditya