why am I getting a segmentation fault when i run this?
void list_users(const User *curr) {
    if (curr != NULL) {
        User *c = (User *) curr;
        while (c != NULL) {
            printf("%s", c->name);
            curr = curr->next;
        }
    }
}