clear train
This commit is contained in:
parent
b539c1c98a
commit
231059682f
@ -54,7 +54,7 @@ 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->next == this->next->next;
|
||||
this == this->next->next;
|
||||
return first;
|
||||
}
|
||||
else {
|
||||
@ -63,4 +63,3 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user