clear
This commit is contained in:
parent
d4271c3370
commit
2230d9d16e
@ -82,8 +82,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);
|
||||||
if(x == 0){
|
if(x == 0){
|
||||||
@ -98,12 +96,7 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
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