Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhid/src/hidpath.c

    r3ca4ae9 ra1732929  
    3636#include <errno.h>
    3737#include <stdio.h>
     38#include <malloc.h>
    3839#include <mem.h>
    39 #include <stdlib.h>
    4040#include <usb/debug.h>
    4141#include <assert.h>
     
    173173void usb_hid_print_usage_path(usb_hid_report_path_t *path)
    174174{
    175         usb_log_debug("USAGE_PATH FOR RId(%d):\n", path->report_id);
    176         usb_log_debug("\tLENGTH: %d\n", path->depth);
     175        usb_log_debug("USAGE_PATH FOR RId(%d):", path->report_id);
     176        usb_log_debug("\tLENGTH: %d", path->depth);
    177177
    178178        list_foreach(path->items, rpath_items_link,
    179179            usb_hid_report_usage_path_t, path_item) {
    180180
    181                 usb_log_debug("\tUSAGE_PAGE: %X\n", path_item->usage_page);
    182                 usb_log_debug("\tUSAGE: %X\n", path_item->usage);
    183                 usb_log_debug("\tFLAGS: %d\n", path_item->flags);
     181                usb_log_debug("\tUSAGE_PAGE: %X", path_item->usage_page);
     182                usb_log_debug("\tUSAGE: %X", path_item->usage);
     183                usb_log_debug("\tFLAGS: %d", path_item->flags);
    184184        }
    185185}
     
    191191 * @param flags       Flags determining the mode of comparison
    192192 *
    193  * @return 0 if both paths are identical, non zero number otherwise
     193 * @return EOK if both paths are identical, non zero number otherwise
    194194 *
    195195 */
     
    213213        // Empty path match all others
    214214        if (path->depth == 0) {
    215                 return 0;
     215                return EOK;
    216216        }
    217217       
     
    239239                                        if (USB_HID_SAME_USAGE(report_item->usage,
    240240                                            path_item->usage))
    241                                                 return 0;
     241                                                return EOK;
    242242                                } else {
    243                                         return 0;
     243                                        return EOK;
    244244                                }
    245245                        }
     
    285285                    ((report_link == &report_path->items.head) &&
    286286                    (path_link == &path->items.head))) {
    287                         return 0;
     287                        return EOK;
    288288                } else {
    289289                        return 1;
     
    297297               
    298298                if (list_empty(&path->items)) {
    299                         return 0;
     299                        return EOK;
    300300                }
    301301               
     
    320320               
    321321                if (path_link == &path->items.head) {
    322                         return 0;
     322                        return EOK;
    323323                } else {
    324324                        return 1;
     
    327327       
    328328        default:
    329                 return -1;
     329                return EINVAL;
    330330        }
    331331}
Note: See TracChangeset for help on using the changeset viewer.