From 8954780055d7f126ccdaa8cc07b44cf48497f8c8 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 2 Nov 2020 14:22:22 +0100 Subject: [PATCH] add --- cv5/a_train.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }