clear train 2 prvky
This commit is contained in:
parent
56ae5df2a6
commit
cf360c5edf
@ -43,14 +43,14 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
if (this == NULL){
|
||||
return NULL;
|
||||
}
|
||||
if (this->next == NULL){
|
||||
/* if (this->next == NULL){
|
||||
if(strcmp(this->value, target) == 0){
|
||||
free(this);
|
||||
return NULL;
|
||||
}else {
|
||||
return first;
|
||||
}
|
||||
}
|
||||
*/ }
|
||||
while( this->next->next != NULL){
|
||||
if(strcmp(this->next->value, target) == 0){
|
||||
free(this->next);
|
||||
|
Loading…
Reference in New Issue
Block a user