From 3972d51effa9fc58c335d09dd8ce702984d838dd Mon Sep 17 00:00:00 2001 From: vj586da Date: Fri, 5 Nov 2021 08:12:06 +0100 Subject: [PATCH] zase zatvorka --- cv4/a_train.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index 5ed5772..175ce96 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -55,10 +55,10 @@ struct car* clear_train(struct car* first, const char* target) { if(strcmp(this->value, target) == 0){ //strcpy(this->value,this->next->value); //this->next=NULL; + strucat car* tmp = this->next; free(this); - this=this->next; //free(this->next); - return this; + return tmp; }else if(strcmp(this->next->value, target) == 0){ free(this->next); this->next=NULL;