clear
This commit is contained in:
parent
73475fc126
commit
8d777667f6
@ -66,10 +66,9 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
while(prev->next->next != NULL){
|
while(prev->next->next != NULL){
|
||||||
int x = strcmp(first->value, target);
|
int x = strcmp(first->value, target);
|
||||||
if(x == 0){
|
if(x == 0){
|
||||||
//first = NULL;
|
|
||||||
first = first->next;
|
first = first->next;
|
||||||
free(first);
|
free(prev);
|
||||||
return first->next;
|
return first;
|
||||||
|
|
||||||
}
|
}
|
||||||
x = strcmp(prev->next->value, target);
|
x = strcmp(prev->next->value, target);
|
||||||
|
Loading…
Reference in New Issue
Block a user