test
This commit is contained in:
parent
ab0afef8a3
commit
ccab180860
@ -52,7 +52,12 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
}
|
||||
}
|
||||
while( this->next->next != NULL){
|
||||
if(strcmp(this->next->value, target) == 0){
|
||||
if(strcmp(this->value, target) == 0){
|
||||
struct car* tmp = this->next;
|
||||
free(this);
|
||||
return tmp;
|
||||
}
|
||||
else if(strcmp(this->next->value, target) == 0){
|
||||
struct car* third = this->next->next;
|
||||
free(this->next);
|
||||
this->next = third;
|
||||
|
Loading…
Reference in New Issue
Block a user