add
This commit is contained in:
parent
acd98c9e47
commit
3caa2bbe73
@ -43,13 +43,13 @@ void cancel_train(struct car* first) {
|
||||
if(first == NULL){
|
||||
return;
|
||||
}
|
||||
if(first->next == NULL){
|
||||
free(first);
|
||||
}
|
||||
else if(first->next != NULL){
|
||||
if(first->next != NULL){
|
||||
cancel_train(first->next);
|
||||
first->next = NULL;
|
||||
}
|
||||
if(first->next == NULL){
|
||||
free(first);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user