From 1556d1882c950cd90e6c458557feaad14b418efb Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Tue, 3 Nov 2020 10:34:41 +0100 Subject: [PATCH] clear --- cv5/a_train.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index 931ea59..ff8d71d 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -65,12 +65,10 @@ struct car* clear_train(struct car* first, const char* target) { if(first == NULL){ return 0; } - int x; if(first->next == NULL){ - x = strcmp(first->value, target); - if(x == 0){ + if(first->value == target){ free(first); - return 0; + return 0; } } else{