clear
This commit is contained in:
parent
2a249097a5
commit
460920648d
@ -63,6 +63,14 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct car* prev = first;
|
struct car* prev = first;
|
||||||
|
int z = strcmp(prev->value, target};
|
||||||
|
if(z == 0){
|
||||||
|
struct car* only = prev->next;
|
||||||
|
free(prev);
|
||||||
|
prev = only;
|
||||||
|
return first;
|
||||||
|
|
||||||
|
}
|
||||||
while(prev->next->next != NULL){
|
while(prev->next->next != NULL){
|
||||||
int x = strcmp(prev->next->value, target);
|
int x = strcmp(prev->next->value, target);
|
||||||
if(x == 0){
|
if(x == 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user