diff --git a/cv5/a_train.c b/cv5/a_train.c index ce28c00..ba93a1b 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -81,8 +81,6 @@ struct car* clear_train(struct car* first, const char* target) { } prev = prev->next; } - - if(prev->next->next == NULL) { int x = strcmp(first->value, target); @@ -97,13 +95,8 @@ struct car* clear_train(struct car* first, const char* target) { struct car* third = prev->next->next; free(prev->next); prev->next = third; - } - - //free(prev->next); - //prev->next = NULL; - } - - + } + } return first; }