C
This commit is contained in:
parent
e276d73b22
commit
09c80a77a9
@ -85,7 +85,7 @@ int get_target_capacity(struct station* station,const char* target){
|
|||||||
}
|
}
|
||||||
ptr = ptr->next;
|
ptr = ptr->next;
|
||||||
|
|
||||||
/* code */
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -97,11 +97,12 @@ int count_targets(struct station* station){
|
|||||||
int count_capacity(struct station* station){
|
int count_capacity(struct station* station){
|
||||||
int res = 0;
|
int res = 0;
|
||||||
struct car* ptr = *station->tracks;
|
struct car* ptr = *station->tracks;
|
||||||
while (ptr){
|
while (ptr && ptr->next){
|
||||||
res += ptr->capacity;
|
res += ptr->capacity;
|
||||||
ptr = ptr->next;
|
ptr = ptr->next;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
res += ptr->capacity;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user