delete
This commit is contained in:
parent
3ec3997cd6
commit
c80a5ff82d
@ -32,15 +32,14 @@ void print_train(struct car* first) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cancel_train(struct car* first) {
|
void cancel_train(struct car* first) {
|
||||||
//struct car* this;
|
struct car* this = first;
|
||||||
if(first == NULL){
|
if(first == NULL){
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
if(first->next == NULL){
|
if(this->next == NULL){
|
||||||
//this = first;
|
this = first->next;
|
||||||
//first = first->next;
|
|
||||||
free(first);
|
free(first);
|
||||||
//first = NULL;
|
this = NULL;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
/*struct car* prev = first;
|
/*struct car* prev = first;
|
||||||
|
Loading…
Reference in New Issue
Block a user