diff --git a/du5/a_station.c b/du5/a_station.c index ed6a3fc..2ba5b92 100644 --- a/du5/a_station.c +++ b/du5/a_station.c @@ -31,11 +31,11 @@ void add_target_capacity(struct station* station,const char* target, int capacit struct car* ptr = *station->tracks; int count = 0; int res = select_track(station, target); - while(ptr && ptr->next){ + while(ptr){ if(count == res){ break; } - else if (strcmp(ptr->value, target) ==0 ){ + if (strcmp(ptr->value, target) ==0 ){ ptr->capacity += capacity; return; }