Changeset e6503e9 in mainline
- Timestamp:
- 2011-05-31T19:54:33Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 61ebd99b, c3dafe1
- Parents:
- 50340bf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/vuhid/device.c
r50340bf re6503e9 96 96 const char *id) 97 97 { 98 vuhid_interface_t *iface = ifaces[0]; 99 while (iface != NULL) { 100 if (str_cmp(iface->id, id) == 0) { 101 return iface; 98 if ((ifaces == NULL) || (id == NULL)) { 99 return NULL; 100 } 101 while (*ifaces != NULL) { 102 if (str_cmp((*ifaces)->id, id) == 0) { 103 return *ifaces; 102 104 } 103 iface ++;104 } 105 106 return iface;105 ifaces++; 106 } 107 108 return NULL; 107 109 } 108 110 … … 119 121 } 120 122 121 // FIXME - we shall set vuhid_data to NULL in the main() rather122 // than to depend on individual interfaces123 123 /* Already used interface. */ 124 124 if (iface->vuhid_data != NULL) { … … 166 166 * Prepare new descriptors. 167 167 */ 168 printf("preparing descriptors...\n");169 168 size_t descr_count = 0; 170 169 size_t total_descr_size = 0; … … 273 272 } 274 273 275 printf("adding extra descriptors...\n");276 274 /* Allocation is okay, we can (actually have to now) overwrite the 277 275 * original pointer.
Note:
See TracChangeset
for help on using the changeset viewer.