how do i properly assign u_count to the index of the removed user in the friendslist?
void remove_friends(const char *name, User **ptr_users) {
    User *curr = *ptr_users;
    while (curr != NULL) {
        int f_count = 0;
        int u_count = 0;
        for (int i = 0; i < MAX_FRIENDS; i++) {
            if (curr->friends[i] != NULL) {
                f_count++;

                if (strcmp(curr->friends[i]->name, name) == 0) {
                    u_count = f_count;
                }
            }
        }

        for (int x = u_count; x < f_count - 1; x++) {
            curr->friends[x] = curr->friends[x + 1];
        }

        curr->friends[f_count - 1] = NULL;

        curr = curr->next;
    }

}