why is friends1[x] != NULL giving me an error
 User *user1 = find_user(name1, head);
    User friends1[MAX_FRIENDS];
    int i = 0;
    while ((*user1).friends[i] != NULL){
            friends1[i] = *(*user1).friends[i];
    }
    User *user2 = find_user(name2, head);
    User friends2[MAX_FRIENDS];
    int j = 0;
    while ((*user2).friends[j] != NULL){
            friends2[j] = *(*user2).friends[j];
    }

    int count1 = 0;
    int count2 = 0;

    int x = 0;
    int y = 0;
    while (friends1[x] != NULL){
            if (friends1[x] == *user2){
                   return 1;
            }
            x++;
            count1++;
            if (count1 > 10){
                    return 2;
            }
    }

typedef struct user {  
    char name[MAX_NAME];  
    char profile_pic[MAX_NAME];  // This is a *filename*, not the file contents.  
    struct post *first_post;  
    struct user *friends[MAX_FRIENDS];  
    struct user *next;  
} User;  