Changeset 3ca4ae9 in mainline for uspace/lib/usbhid/src/hidpath.c


Ignore:
Timestamp:
2017-12-20T15:51:07Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4547f11
Parents:
68a2fab2
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 15:46:56)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 15:51:07)
Message:

Fix error code mixing in usbhid.

File:
1 edited

Legend:

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

    r68a2fab2 r3ca4ae9  
    191191 * @param flags       Flags determining the mode of comparison
    192192 *
    193  * @return EOK if both paths are identical, non zero number otherwise
     193 * @return 0 if both paths are identical, non zero number otherwise
    194194 *
    195195 */
     
    213213        // Empty path match all others
    214214        if (path->depth == 0) {
    215                 return EOK;
     215                return 0;
    216216        }
    217217       
     
    239239                                        if (USB_HID_SAME_USAGE(report_item->usage,
    240240                                            path_item->usage))
    241                                                 return EOK;
     241                                                return 0;
    242242                                } else {
    243                                         return EOK;
     243                                        return 0;
    244244                                }
    245245                        }
     
    285285                    ((report_link == &report_path->items.head) &&
    286286                    (path_link == &path->items.head))) {
    287                         return EOK;
     287                        return 0;
    288288                } else {
    289289                        return 1;
     
    297297               
    298298                if (list_empty(&path->items)) {
    299                         return EOK;
     299                        return 0;
    300300                }
    301301               
     
    320320               
    321321                if (path_link == &path->items.head) {
    322                         return EOK;
     322                        return 0;
    323323                } else {
    324324                        return 1;
     
    327327       
    328328        default:
    329                 return EINVAL;
     329                return -1;
    330330        }
    331331}
Note: See TracChangeset for help on using the changeset viewer.