clear
This commit is contained in:
parent
ce3648c65b
commit
727845e0c9
@ -78,9 +78,9 @@ 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){
|
||||||
struct car *third = this->next->next;
|
struct car *third = this->next;
|
||||||
free(this->next);
|
this->next = third->next;
|
||||||
this->next = third;
|
free(third);
|
||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
this = this->next;
|
this = this->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user