This commit is contained in:
Maryna Kravtsova 2020-11-05 15:54:03 +01:00
parent d4271c3370
commit 2230d9d16e

View File

@ -82,8 +82,6 @@ struct car* clear_train(struct car* first, const char* target) {
prev = prev->next; prev = prev->next;
} }
if(prev->next->next == NULL) { if(prev->next->next == NULL) {
int x = strcmp(first->value, target); int x = strcmp(first->value, target);
if(x == 0){ if(x == 0){
@ -98,12 +96,7 @@ struct car* clear_train(struct car* first, const char* target) {
free(prev->next); free(prev->next);
prev->next = third; prev->next = third;
} }
}
//free(prev->next);
//prev->next = NULL;
}
return first; return first;
} }