clear train

This commit is contained in:
Valér Jakubčo 2021-11-04 20:18:56 +01:00
parent e1a3d77eac
commit cd80b555fd

View File

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