/* Detach and return the first urb in a list with a distinguished head "hd", or NULL if the list is empty.  */
struct urb* first_urb_detached(urb_link *hd)
/* Detach and return the first urb in a list with a distinguished head "hd", or NULL if the list is empty.  */
struct urb* first_urb_detached(urb_link *hd)
{
	struct urb *urb;
	if ((urb = first_urb (hd))) {
		urb_detach (urb);
	}
	return urb;
}