zly return

This commit is contained in:
Valér Jakubčo 2021-11-04 20:38:28 +01:00
parent 41d4e7acb0
commit 03dce445b6

View File

@ -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;
}