clear train
This commit is contained in:
parent
058b79b3c8
commit
b539c1c98a
@ -53,8 +53,8 @@ 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){
|
||||||
this->next == this->next->next;
|
|
||||||
free(this->next);
|
free(this->next);
|
||||||
|
this->next == this->next->next;
|
||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user