Changes in uspace/app/vuhid/device.c [e6503e9:9a884ed] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/vuhid/device.c
re6503e9 r9a884ed 36 36 #include "virthid.h" 37 37 #include <errno.h> 38 #include <stdio.h>39 38 #include <str.h> 40 39 #include <assert.h> … … 96 95 const char *id) 97 96 { 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; 97 vuhid_interface_t *iface = ifaces[0]; 98 while (iface != NULL) { 99 if (str_cmp(iface->id, id) == 0) { 100 return iface; 104 101 } 105 iface s++;106 } 107 108 return NULL;102 iface++; 103 } 104 105 return iface; 109 106 } 110 107 … … 121 118 } 122 119 120 // FIXME - we shall set vuhid_data to NULL in the main() rather 121 // than to depend on individual interfaces 123 122 /* Already used interface. */ 124 123 if (iface->vuhid_data != NULL) { … … 166 165 * Prepare new descriptors. 167 166 */ 167 printf("preparing descriptors...\n"); 168 168 size_t descr_count = 0; 169 169 size_t total_descr_size = 0; … … 272 272 } 273 273 274 printf("adding extra descriptors...\n"); 274 275 /* Allocation is okay, we can (actually have to now) overwrite the 275 276 * original pointer.
Note:
See TracChangeset
for help on using the changeset viewer.