clear
This commit is contained in:
parent
5145027ddd
commit
31432ec6b3
@ -69,6 +69,7 @@ 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;
|
||||||
|
third->next = NULL;
|
||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
prev = prev->next;
|
prev = prev->next;
|
||||||
@ -80,5 +81,6 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
return first;
|
return first;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
return first;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user