Changeset 69b9740 in mainline
- Timestamp:
- 2011-11-28T17:14:48Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9dbfd288
- Parents:
- 0255d36
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/altiface.c
r0255d36 r69b9740 127 127 }; 128 128 129 usb_alternate_interface_descriptors_t * cur_alt_iface129 usb_alternate_interface_descriptors_t *iterator 130 130 = &alternates->alternatives[0]; 131 132 const usb_alternate_interface_descriptors_t *end 133 = &alternates->alternatives[alternates->alternative_count]; 131 134 132 135 const void *iface_ptr = 133 136 usb_dp_get_nested_descriptor(&dp_parser, &dp_data, dp_data.data); 134 137 135 while (iface_ptr != NULL ) {138 while (iface_ptr != NULL && iterator < end) { 136 139 const usb_standard_interface_descriptor_t *iface = iface_ptr; 137 140 … … 145 148 } 146 149 147 cur_alt_iface->interface = iface;148 cur_alt_iface->nested_descriptors = iface_ptr + sizeof(*iface);150 iterator->interface = iface; 151 iterator->nested_descriptors = iface_ptr + sizeof(*iface); 149 152 150 153 /* Find next interface to count size of nested descriptors. */ … … 155 158 dp_data.data + dp_data.size : iface_ptr; 156 159 157 cur_alt_iface->nested_descriptors_size158 = next - cur_alt_iface->nested_descriptors;160 iterator->nested_descriptors_size 161 = next - iterator->nested_descriptors; 159 162 160 ++ cur_alt_iface;163 ++iterator; 161 164 } 162 165
Note:
See TracChangeset
for help on using the changeset viewer.