Conflicting types for 'reversee' in listnode* reversee(listnode* head)


#1

listnode* reverseBetween(listnode* A, int B, int C) {
if (B == C)
return A;

listnode* revs = NULL, *revs_prev = NULL;
listnode* revend = NULL, *revend_next = NULL;
int i = 1;
listnode* curr = A;
while (curr && i <= C) {
    if (i < B)
        revs_prev = curr;
    if (i == B)
        revs = curr;
    if (i == C) {
        revend = curr;
        revend_next = curr->next;
    }

    curr = curr->next;
    i++;
}
revend->next = NULL;
revend = reversee(revs);

if (revs_prev)
    revs_prev->next = revend;
else
    A = revend;

revs->next = revend_next;
return A;

}

listnode* reversee(listnode* head)
{
listnode* prev = NULL;
listnode* curr = head;

while (curr) {
    listnode* next = curr->next;
    curr->next = prev;
    prev = curr;
    curr = next;
}
return prev;

}