Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void USBAPI(DestroyPort) (UsbPort * port)
- {
- if(port->device)
- USBAPI(DestroyDevice)(port->device);
- if(port->hub != NULL)
- {
- UsbPort ** it = &port->hub->ports;
- while((*it) != NULL)
- {
- if((*it) == port)
- *it = (*it)->next;
- else
- it = &(*it)->next;
- }
- }
- free(port);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement