This commit is contained in:
Maryna Kravtsova 2020-11-03 10:34:41 +01:00
parent 22b91c853b
commit 1556d1882c

View File

@ -65,10 +65,8 @@ struct car* clear_train(struct car* first, const char* target) {
if(first == NULL){ if(first == NULL){
return 0; return 0;
} }
int x;
if(first->next == NULL){ if(first->next == NULL){
x = strcmp(first->value, target); if(first->value == target){
if(x == 0){
free(first); free(first);
return 0; return 0;
} }