Trying
This commit is contained in:
parent
aa583c302e
commit
a7b831eab5
@ -52,6 +52,9 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
}
|
}
|
||||||
else if(first->next == NULL && strcmp(first->value, target) != 0){
|
else if(first->next == NULL && strcmp(first->value, target) != 0){
|
||||||
return first;
|
return first;
|
||||||
|
}
|
||||||
|
if(first->next->next == NULL && strcmp(first->value, target) == 0){
|
||||||
|
|
||||||
}
|
}
|
||||||
struct car* temp = first;
|
struct car* temp = first;
|
||||||
struct car* next = first->next;
|
struct car* next = first->next;
|
||||||
@ -69,6 +72,6 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return first;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user