zly return
This commit is contained in:
parent
41d4e7acb0
commit
03dce445b6
@ -48,18 +48,18 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
free(this);
|
||||
return NULL;
|
||||
}else {
|
||||
return first;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
while( this->next->next != NULL){
|
||||
if(strcmp(this->value, target) == 0){
|
||||
free(this->next);
|
||||
this->next = this->next->next;
|
||||
return first;
|
||||
return this;
|
||||
}
|
||||
else {
|
||||
this = this->next;
|
||||
}
|
||||
}
|
||||
return first;
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user