clear
This commit is contained in:
parent
d4271c3370
commit
2230d9d16e
@ -81,8 +81,6 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
}
|
}
|
||||||
prev = prev->next;
|
prev = prev->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(prev->next->next == NULL) {
|
if(prev->next->next == NULL) {
|
||||||
int x = strcmp(first->value, target);
|
int x = strcmp(first->value, target);
|
||||||
@ -97,13 +95,8 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
struct car* third = prev->next->next;
|
struct car* third = prev->next->next;
|
||||||
free(prev->next);
|
free(prev->next);
|
||||||
prev->next = third;
|
prev->next = third;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//free(prev->next);
|
|
||||||
//prev->next = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return first;
|
return first;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user