clear
This commit is contained in:
parent
fdd693443e
commit
533abadd61
@ -59,6 +59,9 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
if(first->next == NULL){
|
if(first->next == NULL){
|
||||||
free(first);
|
free(first);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return first;
|
||||||
}
|
}
|
||||||
prev = first->next;
|
prev = first->next;
|
||||||
free(first);
|
free(first);
|
||||||
|
Loading…
Reference in New Issue
Block a user