This commit is contained in:
Maryna Kravtsova 2020-10-27 18:59:58 +01:00
parent a3c825715d
commit cca93eb82e

View File

@ -31,11 +31,11 @@ void print_train(struct car* first) {
} }
} }
void cancel_train(struct car* first, int val) { void cancel_train(struct car* first) {
if(first == NULL){ if(first == NULL){
exit(0); exit(0);
} }
else if(first->next == NULL){ if(first->value == NULL){
struct car* this; struct car* this;
this = first; this = first;
first = this->next; first = this->next;