From c9ecd592a82e118d22a82ea7c9a2f850de7d3af1 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Tue, 3 Nov 2020 10:41:54 +0100 Subject: [PATCH] clear --- 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 6a68c9d..055815b 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -65,11 +65,10 @@ struct car* clear_train(struct car* first, const char* target) { if(first == NULL){ return 0; } - int result = 0; if(first->next == NULL){ - x = strcmp(first->value, target); - if(x == 0){ + int result = strcmp(first->value, target); + if(result == 0){ free(first); return 0; }