Compare commits

..

No commits in common. "d9c0ad3b4844f86e14f998ba113ead2540915c6b" and "8fb4fea3ecc8fb478f67171248dbce3abd2a42ea" have entirely different histories.

View File

@ -76,27 +76,6 @@ struct car* clear_train(struct car* first, const char* target)
}
}
struct car* prev = first;
if(prev->next->next == NULL)
{
if(!strcmp(prev->value, target))
{
struct car* second = prev->next;
free(prev);
first = second;
return first;
}
else if(!strcmp(prev->next->value, target))
{
free(prev->next);
return first;
}
else
{
return first;
}
}
while (prev->next->next != NULL)
{
if(strcmp(prev->value, target))