Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/hidparser.c

    r96bfe76 rb53d3b7  
    164164                                        // store current usage path
    165165                                        report_item->usage_path = usage_path;
     166
     167                                        // new current usage path
     168                                        tmp_usage_path = usb_hid_report_path();
    166169                                       
    167                                         // clone path to the new one
    168                                         tmp_usage_path = usb_hid_report_path_clone(usage_path);
     170                                        // copy old path to the new one
     171                                        usb_hid_report_path_clone(tmp_usage_path, usage_path);
    169172
    170173                                        // swap
     
    793796}
    794797
    795 size_t usb_hid_report_input_length(const usb_hid_report_parser_t *parser,
     798int usb_hid_report_input_length(const usb_hid_report_parser_t *parser,
    796799        usb_hid_report_path_t *path, int flags)
    797800{       
     
    946949                        break;
    947950
    948                 /* compare with only the end of path*/
     951                /* given path must be the end of the report one*/
    949952                case USB_HID_PATH_COMPARE_END:
    950953                                report_link = report_path->link.prev;
     
    10161019
    10171020/**
    1018  * Clone content of given usage path to the new one
    1019  *
    1020  */
    1021 usb_hid_report_path_t *usb_hid_report_path_clone(usb_hid_report_path_t *usage_path)
     1021 *
     1022 */
     1023int     usb_hid_report_path_clone(usb_hid_report_path_t *new_usage_path, usb_hid_report_path_t *usage_path)
    10221024{
    10231025        usb_hid_report_usage_path_t *path_item;
    10241026        link_t *path_link;
    1025         usb_hid_report_path_t *new_usage_path = usb_hid_report_path ();
    1026 
    1027         if(new_usage_path == NULL){
    1028                 return NULL;
    1029         }
     1027
    10301028       
    10311029        if(list_empty(&usage_path->link)){
    1032                 return new_usage_path;
     1030                return EOK;
    10331031        }
    10341032
     
    10411039        }
    10421040
    1043         return new_usage_path;
     1041        return EOK;
    10441042}
    10451043
Note: See TracChangeset for help on using the changeset viewer.