Changes in uspace/lib/usbdev/src/recognise.c [33b8d024:8d2dd7f2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/recognise.c
r33b8d024 r8d2dd7f2 60 60 * @return Error code. 61 61 */ 62 static errno_t usb_add_match_id(match_id_list_t *matches, int score,63 c har *match_str)62 static int usb_add_match_id(match_id_list_t *matches, int score, 63 const char *match_str) 64 64 { 65 65 assert(matches); … … 88 88 char *str = NULL; \ 89 89 int __rc = asprintf(&str, format, ##__VA_ARGS__); \ 90 if (__rc >= 0) { \ 91 errno_t __rc = usb_add_match_id((match_ids), (score), str); \ 92 if (__rc != EOK) { \ 93 free(str); \ 94 return __rc; \ 95 } \ 96 } else { \ 97 return ENOMEM; \ 90 if (__rc > 0) { \ 91 __rc = usb_add_match_id((match_ids), (score), str); \ 92 } \ 93 if (__rc != EOK) { \ 94 free(str); \ 95 return __rc; \ 98 96 } \ 99 97 } while (0) … … 108 106 * @retval ENOENT Device class is not "use interface". 109 107 */ 110 errno_t usb_device_create_match_ids_from_interface(108 int usb_device_create_match_ids_from_interface( 111 109 const usb_standard_device_descriptor_t *desc_device, 112 110 const usb_standard_interface_descriptor_t *desc_interface, … … 220 218 * @return Error code. 221 219 */ 222 errno_t usb_device_create_match_ids_from_device_descriptor(220 int usb_device_create_match_ids_from_device_descriptor( 223 221 const usb_standard_device_descriptor_t *device_descriptor, 224 222 match_id_list_t *matches) … … 264 262 * @return Error code. 265 263 */ 266 errno_t usb_device_create_match_ids(usb_pipe_t *ctrl_pipe,264 int usb_device_create_match_ids(usb_pipe_t *ctrl_pipe, 267 265 match_id_list_t *matches) 268 266 { 269 267 assert(ctrl_pipe); 270 errno_t rc;268 int rc; 271 269 /* 272 270 * Retrieve device descriptor and add matches from it.
Note:
See TracChangeset
for help on using the changeset viewer.