diff --git a/cv5/a_train.c b/cv5/a_train.c index dbc539e..8bb0856 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -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);