Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/recognise.c

    r33b8d024 r8d2dd7f2  
    6060 * @return Error code.
    6161 */
    62 static errno_t usb_add_match_id(match_id_list_t *matches, int score,
    63     char *match_str)
     62static int usb_add_match_id(match_id_list_t *matches, int score,
     63    const char *match_str)
    6464{
    6565        assert(matches);
     
    8888                char *str = NULL; \
    8989                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; \
    9896                } \
    9997        } while (0)
     
    108106 * @retval ENOENT Device class is not "use interface".
    109107 */
    110 errno_t usb_device_create_match_ids_from_interface(
     108int usb_device_create_match_ids_from_interface(
    111109    const usb_standard_device_descriptor_t *desc_device,
    112110    const usb_standard_interface_descriptor_t *desc_interface,
     
    220218 * @return Error code.
    221219 */
    222 errno_t usb_device_create_match_ids_from_device_descriptor(
     220int usb_device_create_match_ids_from_device_descriptor(
    223221    const usb_standard_device_descriptor_t *device_descriptor,
    224222    match_id_list_t *matches)
     
    264262 * @return Error code.
    265263 */
    266 errno_t usb_device_create_match_ids(usb_pipe_t *ctrl_pipe,
     264int usb_device_create_match_ids(usb_pipe_t *ctrl_pipe,
    267265    match_id_list_t *matches)
    268266{
    269267        assert(ctrl_pipe);
    270         errno_t rc;
     268        int rc;
    271269        /*
    272270         * Retrieve device descriptor and add matches from it.
Note: See TracChangeset for help on using the changeset viewer.