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