This commit is contained in:
Maryna Kravtsova 2020-11-01 19:33:47 +01:00
parent ae83e17915
commit e0e3d11bf2

View File

@ -36,9 +36,8 @@ void cancel_train(struct car* first) {
exit(0); exit(0);
} }
if(first->next == NULL){ if(first->next == NULL){
struct car* this; struct car* this = first;
this = first; first = first->next;
first = this->next;
free(this); free(this);
} }
cancel_train(first->next); cancel_train(first->next);