ach
This commit is contained in:
parent
68af5bdecd
commit
0f80ed26de
@ -24,10 +24,13 @@ struct station* create_station(){
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
void destroy_station(struct station* station){
|
void destroy_station(struct station* station){
|
||||||
|
//struct car* del =prev;
|
||||||
for(int i=0;i>station->track_count;i++){
|
for(int i=0;i>station->track_count;i++){
|
||||||
struct car* prev = station->tracks[i];
|
struct car* prev = station->tracks[i];
|
||||||
while (prev!=NULL)
|
while (prev!=NULL)
|
||||||
{
|
{
|
||||||
|
struct car* del =prev;
|
||||||
|
prev=del->next;
|
||||||
free(del);
|
free(del);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +39,6 @@ void destroy_station(struct station* station){
|
|||||||
free(station->tracks);
|
free(station->tracks);
|
||||||
free(station);
|
free(station);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
int select_track(struct station* station, const char* target){
|
int select_track(struct station* station, const char* target){
|
||||||
unsigned long hash=0;
|
unsigned long hash=0;
|
||||||
|
Loading…
Reference in New Issue
Block a user