Deleted Added
full compact
1c1
< /* $FreeBSD: head/lib/libusb/libusb10_desc.c 195957 2009-07-30 00:11:41Z alfred $ */
---
> /* $FreeBSD: head/lib/libusb/libusb10_desc.c 199055 2009-11-08 20:03:52Z thompsa $ */
37a38,39
> #define N_ALIGN(n) (-((-(n)) & (-8UL)))
>
117c119
< nextra = pconf->extra.len;
---
> nextra = N_ALIGN(pconf->extra.len);
122c124
< nextra += pinf->extra.len;
---
> nextra += N_ALIGN(pinf->extra.len);
127c129
< nextra += pend->extra.len;
---
> nextra += N_ALIGN(pend->extra.len);
135c137
< nextra += pinf->extra.len;
---
> nextra += N_ALIGN(pinf->extra.len);
140c142
< nextra += pend->extra.len;
---
> nextra += N_ALIGN(pend->extra.len);
152a155,156
> nextra = N_ALIGN(nextra);
>
159c163
< /* make sure memory is clean */
---
> /* make sure memory is initialised */
162,163c166
< pconfd->interface = (libusb_interface *) (pconfd +
< sizeof(libusb_config_descriptor));
---
> pconfd->interface = (libusb_interface *) (pconfd + 1);
184c187
< pextra += pconfd->extra_length;
---
> pextra += N_ALIGN(pconfd->extra_length);
224c227
< pextra += pinf->extra.len;
---
> pextra += N_ALIGN(pinf->extra.len);
241c244
< pextra += pend->extra.len;
---
> pextra += N_ALIGN(pend->extra.len);
306a310,318
>
> int
> libusb_get_descriptor(libusb_device_handle * devh, uint8_t desc_type,
> uint8_t desc_index, uint8_t *data, int length)
> {
> return (libusb_control_transfer(devh, LIBUSB_ENDPOINT_IN,
> LIBUSB_REQUEST_GET_DESCRIPTOR, (desc_type << 8) | desc_index, 0, data,
> length, 1000));
> }