Fixing the link issue
This commit is contained in:
parent
2110f6c8a6
commit
70c14170fa
@ -65,9 +65,8 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
struct car* next = first->next;
|
struct car* next = first->next;
|
||||||
while (next->next)
|
while (next->next)
|
||||||
{if(strcmp(next->value, target) == 0){
|
{if(strcmp(next->value, target) == 0){
|
||||||
|
|
||||||
temp->next = next->next;
|
|
||||||
next->next = NULL;
|
next->next = NULL;
|
||||||
|
temp->next = next->next;
|
||||||
free(next);
|
free(next);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user