From 03dce445b634f6ccd2251b31fa16312c0eda6ac1 Mon Sep 17 00:00:00 2001 From: vj586da Date: Thu, 4 Nov 2021 20:38:28 +0100 Subject: [PATCH] zly return --- cv4/a_train.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index bcf8dd4..205e5ac 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -48,18 +48,18 @@ struct car* clear_train(struct car* first, const char* target) { free(this); return NULL; }else { - return first; + return this; } } while( this->next->next != NULL){ if(strcmp(this->value, target) == 0){ free(this->next); this->next = this->next->next; - return first; + return this; } else { this = this->next; } } - return first; + return this; }