clear
This commit is contained in:
parent
52dfe1c8e7
commit
c484e99e36
@ -69,7 +69,7 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
if(first == this){
|
||||
first = this->next;
|
||||
free(this);
|
||||
return 0;
|
||||
return first;
|
||||
}
|
||||
while(curr != this){
|
||||
prev = curr;
|
||||
@ -77,7 +77,7 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
|
||||
}
|
||||
prev->next = curr->next;
|
||||
//free(this);
|
||||
free(this);
|
||||
}
|
||||
this = this->next;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user