diff --git a/cv4/a_train.c b/cv4/a_train.c index 97ba3b7..d01dc7b 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -54,12 +54,12 @@ struct car* clear_train(struct car* first, const char* target) { while( this->next->next != NULL){ if(strcmp(this->next->value, target) == 0){ free(this->next); - this == this->next->next; + this->next = this->next->next; return first; } else { - continue; + this = this->next; } } - return NULL; + return first; }