diff --git a/cv4/a_train.c b/cv4/a_train.c index cbd4b57..afaecb6 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -55,8 +55,11 @@ struct car* clear_train(struct car* first, const char* target) { if(strcmp(this->value, target) == 0){ this->next == this->next->next; free(this); + return first; + } + else { + continue; } - this = this->next; } return NULL; }