zly return

This commit is contained in:
Valér Jakubčo 2021-11-04 20:42:32 +01:00
parent 6355055a5c
commit a66b22631d

View File

@ -61,5 +61,12 @@ struct car* clear_train(struct car* first, const char* target) {
this = this->next; this = this->next;
} }
} }
if(strcmp(this->value, target) ==0){
free(this);
this->next = NULL;
return this;
}
else{
return first; return first;
}
} }