From e0e3d11bf274c14a6dcfec20a6a5fc8157cfef11 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Sun, 1 Nov 2020 19:33:47 +0100 Subject: [PATCH] train --- cv5/a_train.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index a4645b1..12d27bd 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -36,9 +36,8 @@ void cancel_train(struct car* first) { exit(0); } if(first->next == NULL){ - struct car* this; - this = first; - first = this->next; + struct car* this = first; + first = first->next; free(this); } cancel_train(first->next);