Changeset 46577995 in mainline for uspace/drv/hid/usbhid/main.c


Ignore:
Timestamp:
2018-01-04T20:50:52Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
e211ea04
Parents:
facacc71
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

After this commit, HelenOS is free of code that mixes error codes with non-error
values on the assumption that error codes are negative.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/hid/usbhid/main.c

    rfacacc71 r46577995  
    5656 * @return Error code.
    5757 */
    58 static int usb_hid_device_add(usb_device_t *dev)
     58static errno_t usb_hid_device_add(usb_device_t *dev)
    5959{
    6060        usb_log_debug("%s\n", __FUNCTION__);
     
    7777        }
    7878
    79         int rc = usb_hid_init(hid_dev, dev);
     79        errno_t rc = usb_hid_init(hid_dev, dev);
    8080        if (rc != EOK) {
    8181                usb_log_error("Failed to initialize USB/HID device.\n");
     
    122122 * @return Error code.
    123123 */
    124 static int usb_hid_device_rem(usb_device_t *dev)
     124static errno_t usb_hid_device_rem(usb_device_t *dev)
    125125{
    126126        // TODO: Stop device polling
     
    135135 * @return Error code.
    136136 */
    137 static int usb_hid_device_gone(usb_device_t *dev)
     137static errno_t usb_hid_device_gone(usb_device_t *dev)
    138138{
    139139        assert(dev);
Note: See TracChangeset for help on using the changeset viewer.