diff --git a/cv4/a_train.c b/cv4/a_train.c index bcf8dd4..205e5ac 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -48,18 +48,18 @@ struct car* clear_train(struct car* first, const char* target) { free(this); return NULL; }else { - return first; + return this; } } while( this->next->next != NULL){ if(strcmp(this->value, target) == 0){ free(this->next); this->next = this->next->next; - return first; + return this; } else { this = this->next; } } - return first; + return this; }