clear train
This commit is contained in:
parent
e1a3d77eac
commit
cd80b555fd
@ -55,8 +55,11 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
if(strcmp(this->value, target) == 0){
|
||||
this->next == this->next->next;
|
||||
free(this);
|
||||
return first;
|
||||
}
|
||||
else {
|
||||
continue;
|
||||
}
|
||||
this = this->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user