At this point `p != NULL` is always true (if you keep using the default case in the previous switch).