Deleted unnecessary `if` checking.

The `cur->next` from the following code provides the same functionality.
`for (TreeLinkNode *cur = root; cur->next; cur = cur->next)`