Why is this function is only printing the last two nodes instead of all nodes?
void list_users(const User *curr) {
        printf("User List\n");
        User *temp;
        User *head = (User *) curr;
        temp = (User *) curr;
        while (temp != NULL){
                printf("\t%s\n", temp->name);
                temp = temp->next;
        }
        curr = head;
}
