clear
This commit is contained in:
parent
2c6c2c9004
commit
6b862ba9d7
@ -84,10 +84,12 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
while(this != NULL){
|
||||
int x = strcmp(this->value, target);
|
||||
if(x == 0){
|
||||
first = this->next;
|
||||
free(this)
|
||||
this->next = NULL;
|
||||
//free(this->next);
|
||||
|
||||
return this;
|
||||
return first;
|
||||
}
|
||||
this = this->next;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user