diff --git a/cv5/a_train.c b/cv5/a_train.c index fe10f4b..76880d1 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -41,9 +41,9 @@ void print_train(struct car* first) { void cancel_train(struct car* first) { if(first == NULL){ - exit(0); + return; } - else if(first->next == NULL){ + if(first->next == NULL){ free(first); //first = NULL; }