Commiting
This commit is contained in:
parent
a7b831eab5
commit
377ae74ccc
@ -54,6 +54,11 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
return first;
|
||||
}
|
||||
if(first->next->next == NULL && strcmp(first->value, target) == 0){
|
||||
struct car* temp = first;
|
||||
first = first->next;
|
||||
first->next = NULL;
|
||||
free(temp);
|
||||
return NULL;
|
||||
|
||||
}
|
||||
struct car* temp = first;
|
||||
@ -72,6 +77,6 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
|
||||
}
|
||||
|
||||
return temp;
|
||||
return first;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user