/*
 * Make a new post from 'author' to the 'target' user,
 * containing the given contents, IF the users are friends.
 *
 * Insert the new post at the *front* of the user's list of posts.
 *
 * 'contents' is a pointer to heap-allocated memory - you do not need
 * to allocate more memory to store the contents of the post.
 *
 * Return:
 *   - 0 on success
 *   - 1 if users exist but are not friends
 *   - 2 if either User pointer is NULL
 */
int make_post(const User *author, User *target, char *contents) {
    // Checks if either user pointer are NULL
    if (author == NULL || target == NULL) {
        return 2;
    }
    // Checks if users are friends
    int i = 0;
    int they_are_friends = 0;
    while (i < MAX_FRIENDS) {
        if ((author->friends[i] != NULL) && author->friends[i]->name == target->name) {
            they_are_friends += 1;
        }
        if ((target->friends[i] != NULL) && target->friends[i]->name == author->name) {
            they_are_friends += 1;
        }
        i += 1;
    }
    if (they_are_friends == 0) {
        return 1;
    }
    else {
        // They are friends and add post content to target's profile
        Post *a_post = (Post *)malloc(sizeof(Post));
        if (a_post == NULL) {
            exit(1);
        }
        strcpy(a_post->author, author->name);
        a_post->contents = contents;
        // Get time
        time_t *posted_datetime = malloc(sizeof(time_t));
        if (posted_datetime == NULL) {
            exit(1);
        }
        a_post->date = posted_datetime;
        
        // Insert new post
        if (target->first_post != NULL) {
            // NOT too sure about this part 
            a_post->next = target->first_post;
            target->first_post = a_post; 
        }
        else{ // If the user has no post initially 
            target->first_post = a_post;
            a_post->next = NULL;
        }
        return 0;
    }
}


/*
 * From the list pointed to by *user_ptr_del, delete the user
 * with the given name.
 * Remove the deleted user from any lists of friends.
 *
 * Return:
 *   - 0 on success.
 *   - 1 if a user with this name does not exist.
 */
int delete_user(const char *name, User **user_ptr_del) {
    User *wanted_user = find_user(name, *user_ptr_del);
    // Checks if the user was found 
    if (wanted_user == NULL) {
        return 1;
    }
    User *curr = *user_ptr_del;
    User *wanted_user_2;
    // Look for user to delete by traversing through user linked list
    while (curr != NULL){
        // If there are more than one user in the program. If there is only one, head == user with name and they would have no friends. 
        if (curr->next != NULL && (strcmp(name, curr->next->name) == 0)){
            wanted_user_2 = curr->next;
            // Remove user off of their friends list
            int i = 0;
            while (i < MAX_FRIENDS && (wanted_user_2->friends[i] != NULL)) {
                // Pop user off each of their friend's friend list
                int j = 0;
                while (j < MAX_FRIENDS && (wanted_user_2->friends[i][j] != NULL)) {
                    // Checks if the friend you found in the person's friend list is them

                    // Means that the first friend is the to be removed user
                    if (wanted_user_2->friends[i][0]->name == wanted_user_2->name) {
                        wanted_user_2->friends[i][0] = wanted_user_2->friends[i][0]->next; // IS THIS LEGAL???
                    }
                    // Checks if the next friend is not NULL and that they match the user you want to remove
                    else if (wanted_user_2->friends[i][j]->next != NULL && (wanted_user_2->friends[i][0]->next->name == wanted_user_2->name)) {
                        wanted_user_2->friends[i][j]->next = wanted_user_2->friends[i][j]->next->next;
                    }
                    // Checks if the user is at the end of the list 
                    else if (wanted_user_2->friends[i][j]->next->next == NULL && (wanted_user_2->friends[i][0]->next->name == wanted_user_2->name)) {
                        wanted_user_2->friends[i][j]->next = NULL;
                    }
                    j+=1;
                }   
                i += 1;
            }
            break;
        }
        curr = curr->next;
    }
    // Change the pointers
    // If user is the head (IDK if you write * in front)
    if (*user_ptr_del->next == NULL) {
        *user_ptr_del = *user_ptr_del->next;
    }
    else {
        // Set previous user of the wanted user to the user after the wanted user.
        curr->next = curr->next->next;
    }

    // Free the user's post
    Post *curr_post = wanted_user->first_post;
    while (curr_post != NULL) {
        free(curr_post->author);
        free(curr_post->contents);
        free(curr_post->date);
        curr_post = curr_post->next;
    }

    // Free the user
    free(user);

    return 0;
}

Get rid of errors.