mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-25 18:31:14 +00:00
- moved protocol removal to a proper function
This commit is contained in:
parent
77a1805504
commit
f087a2d3bc
@ -89,6 +89,18 @@ static NetProtocol *find_protocol(uint16 type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove all protocols
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void remove_all_protocols(void)
|
||||||
|
{
|
||||||
|
NetProtocol *p;
|
||||||
|
while ((p = (NetProtocol *)prot_list.RemoveItem((long)0)) != NULL)
|
||||||
|
delete p;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialization
|
* Initialization
|
||||||
*/
|
*/
|
||||||
@ -248,9 +260,7 @@ void EtherExit(void)
|
|||||||
delete_area(buffer_area);
|
delete_area(buffer_area);
|
||||||
|
|
||||||
// Remove all protocols
|
// Remove all protocols
|
||||||
NetProtocol *p;
|
remove_all_protocols();
|
||||||
while ((p = (NetProtocol *)prot_list.RemoveItem((long)0)) != NULL)
|
|
||||||
delete p;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,10 +271,7 @@ void EtherExit(void)
|
|||||||
|
|
||||||
void EtherReset(void)
|
void EtherReset(void)
|
||||||
{
|
{
|
||||||
// Remove all protocols
|
remove_all_protocols();
|
||||||
NetProtocol *p;
|
|
||||||
while ((p = (NetProtocol *)prot_list.RemoveItem((long)0)) != NULL)
|
|
||||||
delete p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user