This commit is contained in:
Maryna Kravtsova 2020-11-04 13:08:34 +01:00
parent 5145027ddd
commit 31432ec6b3

View File

@ -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;
} }