From ab0afef8a3c05297c76073b74a4fd4b98efc08c4 Mon Sep 17 00:00:00 2001 From: vj586da Date: Fri, 5 Nov 2021 08:41:35 +0100 Subject: [PATCH] test --- cv4/a_train.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index 2b9d0e5..13f0b6b 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -51,17 +51,6 @@ struct car* clear_train(struct car* first, const char* target) { return this; } } - /*if(this->next->next == NULL){ - if(strcmp(this->value, target) == 0){ - struct car* tmp = this->next; - free(this); - return tmp; - }else if(strcmp(this->next->value, target) == 0){ - free(this->next); - this->next=NULL; - return this; - } - }*/ while( this->next->next != NULL){ if(strcmp(this->next->value, target) == 0){ struct car* third = this->next->next; @@ -80,7 +69,7 @@ struct car* clear_train(struct car* first, const char* target) { }else if(strcmp(this->next->value, target) == 0){ free(this->next); this->next=NULL; - return this; + return first; } return first; }