what are the problems of this function
int create_user(const char *name, User **user_ptr_add) {
    User *curr = *user_ptr_add;
    User *prev = NULL;
    while (curr != NULL) {
        if (strcmp(name, curr->name) == 0) {
            return 1;
        }
        prev = curr;
        curr = curr->next;
    }
    // This stage is reached if curr is NULL
    if (strlen(name) > MAX_NAME - 1) {
        return 2;
    }
    User *usr = malloc(sizeof(User));
    strncpy(usr->name, name, MAX_NAME); // not a literal so we must copy
    usr->next = NULL;
    prev->next = usr;
    return 0;
}