I"m getting a seg fault at the while loop, I have determined that this is due to the currentEmployee. setting currentEmployee = to *firstEmployee though I would think would solve this but I'm not getting anywhere.Code:void hire(FILE **infile, char lineOfText[], struct employee **firstEmployee) { struct employee *newEmployee = NULL; struct employee *previousEmployee = NULL; struct employee *currentEmployee = NULL; read(*infile, lineOfText); while(lineOfText[ZEROI] != '*') { allocate(&newEmployee); sscanf(lineOfText, "%s%s%d%s", newEmployee->lastName, newEmployee->firstName, &newEmployee->id, newEmployee->class); printf("%s\n", newEmployee->lastName); if(newEmployee != NULL) { previousEmployee = NULL; currentEmployee = *firstEmployee; while((currentEmployee != NULL) && (strcmp(newEmployee->lastName, currentEmployee->lastName) > ZEROI)) { previousEmployee = currentEmployee; currentEmployee = currentEmployee->nextEmployee; }