Here is a recursive version.
int firstPositive(const ListCell* L)
{
if(L == NULL) return 0;
else if(L->item > 0) return L->item;
else return firstPositive(L->next);
}
Here is a looping version.
int firstPositive(const ListCell* L)
{
const ListCell* p = L;
while(p != NULL)
{
if(p->item > 0) return p->item;
p = p->next;
}
return 0;
}