From cca93eb82e52bfc784614700726f8ecff57bdf4a Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Tue, 27 Oct 2020 18:59:58 +0100 Subject: [PATCH] train2 --- 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 9774063..e889bd1 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -31,11 +31,11 @@ void print_train(struct car* first) { } } -void cancel_train(struct car* first, int val) { +void cancel_train(struct car* first) { if(first == NULL){ exit(0); } - else if(first->next == NULL){ + if(first->value == NULL){ struct car* this; this = first; first = this->next;