why is *(user->first_post) = *(user->first_post)->next; giving me a segmentation fault?
int make_post(const User *author, User *target, char *contents) {
        if (author == NULL || target == NULL){
                return 2;
        }
        for (int i = 0; i < MAX_FRIENDS; i++){
                if (author->friends[i] == target){
                        Post *new_post = malloc(sizeof(Post));
                        strcpy(new_post->contents, contents);
                        strcpy(new_post->author, author->name);

                        time_t curtime;
                        time(&curtime);
                        new_post->date = &curtime;

                        new_post->next = target->first_post;
                        target->first_post = new_post;
                        return 0;
                }
        }
        return 1;
}

typedef struct post {  
    char author[MAX_NAME];  
    char *contents;  
    time_t *date;  
    struct post *next;  
} Post;  