/*
 * Return a pointer to the user with this name in
 * the list starting with head. Return NULL if no such user exists.
 *
 * NOTE: You'll likely need to cast a (const User *) to a (User *)
 * to satisfy the prototype without warnings.
 */
User *find_user(const char *name, const User *head) {
    User *curr = (User *) head;

    while (curr != NULL) {
//        printf("Iterating");
        if (strcmp(curr->name, name) == 0) { // TODO: adding == 0 causes seg fault
            return curr;
        }

        curr = curr->next;
    }
    return NULL;

/*
 * Return a pointer to the user with this name in
 * the list starting with head. Return NULL if no such user exists.
 *
 * NOTE: You'll likely need to cast a (const User *) to a (User *)
 * to satisfy the prototype without warnings.
 */