From 231059682fb5e9c200609531664d98cb9f09e1ce Mon Sep 17 00:00:00 2001 From: vj586da Date: Thu, 4 Nov 2021 20:25:53 +0100 Subject: [PATCH] clear train --- cv4/a_train.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index 691e616..97ba3b7 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -54,7 +54,7 @@ struct car* clear_train(struct car* first, const char* target) { while( this->next->next != NULL){ if(strcmp(this->next->value, target) == 0){ free(this->next); - this->next == this->next->next; + this == this->next->next; return first; } else { @@ -63,4 +63,3 @@ struct car* clear_train(struct car* first, const char* target) { } return NULL; } -