error in new_post->author = malloc(MAX_NAME * sizeof(char));
int make_post(const User *author, User *target, char *contents) {
        if (author == NULL || target == NULL) {
        return 2;
    }
        if (check_friends((User *)author, target) == 1) {
                return 1;
        }

        Post *new_post = malloc(sizeof(Post));
        new_post->author = malloc(MAX_NAME * sizeof(char));
        strcpy(new_post->author, author->name);
        strcpy(new_post->contents, contents);

        time_t curtime;
        new_post->date = &curtime;
        new_post->next = target->first_post->next;
        target->first_post = new_post;

        return 0;
}

int check_friends(User *author, User *target) {
        int friends = 1;

        int i = 0;
        while (i < MAX_FRIENDS) {
                if (author->friends[i] == NULL) {
                        break;
                }

                if (strcmp(author->friends[i]->name, target->name) == 0) {
                        friends = 0;
                }
                i++;
        }

        return friends;
}