clear
This commit is contained in:
parent
2716eb2775
commit
81c09c06b7
@ -82,9 +82,10 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
struct car* this = first;
|
struct car* this = first;
|
||||||
while(this != NULL){
|
while(this != NULL){
|
||||||
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