what is a better more correct way to do this?
    // Create variables to track if the friends were added to each other's
    // friend lists
    int f1_added = 0;
    int f2_added = 0;

    // Create a counter to track list index
    int count = 0;

    // Keep looping so long as a new friend is not added to both users
    while ((f1_added == 0 || f2_added == 0) && count < MAX_FRIENDS) {
        if (friend1->friends[count] == NULL && f1_added == 0) {
            if (check_if_not_friends(friend1, friend2) == 0) {
                friend1->friends[count] = friend2;
                f1_added = 1;     // Track that friend2 was added to friend1's friendlist
            }
        }
        if (friend2->friends[count] == NULL && f2_added == 0) {
            if (check_if_not_friends(friend2, friend1) == 0) {
                friend2->friends[count] = friend1;
                f2_added = 1;  // Track that friend 1 was added to friend2's friendlist
            }
        }
        count++;
    }