This commit is contained in:
Maryna Kravtsova 2020-10-26 17:25:34 +01:00
parent 120b613700
commit 292d576b55

View File

@ -22,7 +22,7 @@ struct car* add_car(struct car* first,const char* target) {
void print_train(struct car* first) {
struct car* this = first;
if(first == NULL){
return;
exit(0);
}
else{
while(this != NULL){
@ -35,7 +35,7 @@ void print_train(struct car* first) {
void cancel_train(struct car* first) {
if(first == NULL){
return;
exit(0);
}
cancel_train(first->next);
free(first);