• + 0 comments

    I disagree. If both are NULL, then

    if (headA == NULL)
        return headB;
    

    will trigger and return NULL since that is what headB equals to. And we did expect NULL, so the case of two NULLs is indeed redundant.