if the popped node is not the root of tree

if (!empty(&s))