since the stack s cannot be empty, pop it, updating the current node pointer

pop (&s,&p);