clear
This commit is contained in:
parent
2716eb2775
commit
81c09c06b7
@ -84,7 +84,8 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
while(this != NULL){
|
while(this != NULL){
|
||||||
int x = strcmp(this->value, target);
|
int x = strcmp(this->value, target);
|
||||||
if(x == 0){
|
if(x == 0){
|
||||||
return NULL;
|
free(this);
|
||||||
|
return first;
|
||||||
}
|
}
|
||||||
this = this->next;
|
this = this->next;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user