final3?
This commit is contained in:
parent
ab94fb17f3
commit
e8dc186e9c
@ -65,8 +65,9 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
}
|
}
|
||||||
while( this->next->next != NULL){
|
while( this->next->next != NULL){
|
||||||
if(strcmp(this->next->value, target) == 0){
|
if(strcmp(this->next->value, target) == 0){
|
||||||
|
struct car* third = this->next->next;
|
||||||
free(this->next);
|
free(this->next);
|
||||||
this->next = this->next->next;
|
this->next = third;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user