train
This commit is contained in:
parent
120b613700
commit
292d576b55
@ -22,7 +22,7 @@ struct car* add_car(struct car* first,const char* target) {
|
||||
void print_train(struct car* first) {
|
||||
struct car* this = first;
|
||||
if(first == NULL){
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
else{
|
||||
while(this != NULL){
|
||||
@ -35,7 +35,7 @@ void print_train(struct car* first) {
|
||||
|
||||
void cancel_train(struct car* first) {
|
||||
if(first == NULL){
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
cancel_train(first->next);
|
||||
free(first);
|
||||
|
Loading…
Reference in New Issue
Block a user