clear
This commit is contained in:
parent
9ea3cb77e6
commit
c6ade28c0b
@ -63,7 +63,7 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct car* this = first;
|
struct car* this = first;
|
||||||
while(this->next->next != NULL){
|
while(this->next != NULL){
|
||||||
int x = strcmp(this->value, target);
|
int x = strcmp(this->value, target);
|
||||||
if(x == 0){
|
if(x == 0){
|
||||||
struct car* curr = first;
|
struct car* curr = first;
|
||||||
@ -83,14 +83,14 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
}
|
}
|
||||||
this = this->next;
|
this = this->next;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
|
|
||||||
int x = strcmp(this->next->value, target);
|
int x = strcmp(this->next->value, target);
|
||||||
if(x == 0){
|
if(x == 0){
|
||||||
free(this->next);
|
free(this->next);
|
||||||
this->next = NULL;
|
this->next = NULL;
|
||||||
return first;
|
return first;
|
||||||
}*/
|
}
|
||||||
return first;
|
return first;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user