Changeset 46577995 in mainline for uspace/app/vuhid/device.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/app/vuhid/device.c

    rfacacc71 r46577995  
    4141#include <usb/classes/classes.h>
    4242
    43 static int on_data_from_device(usbvirt_device_t *dev,
     43static errno_t on_data_from_device(usbvirt_device_t *dev,
    4444    usb_endpoint_t ep, usb_transfer_type_t tr_type,
    4545    void *data, size_t data_size, size_t *actual_size)
     
    5858}
    5959
    60 static int on_data_to_device(usbvirt_device_t *dev,
     60static errno_t on_data_to_device(usbvirt_device_t *dev,
    6161    usb_endpoint_t ep, usb_transfer_type_t tr_type,
    6262    const void *data, size_t data_size)
     
    7575}
    7676
    77 static int interface_life_fibril(void *arg)
     77static errno_t interface_life_fibril(void *arg)
    7878{
    7979        vuhid_interface_t *iface = arg;
     
    109109}
    110110
    111 int add_interface_by_id(vuhid_interface_t **interfaces, const char *id,
     111errno_t add_interface_by_id(vuhid_interface_t **interfaces, const char *id,
    112112    usbvirt_device_t *dev)
    113113{
     
    161161
    162162        /* From now on, in case of errors, we goto to error_leave */
    163         int rc;
     163        errno_t rc;
    164164
    165165        /*
Note: See TracChangeset for help on using the changeset viewer.