Changeset 46577995 in mainline for uspace/srv/hid/output/output.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/srv/hid/output/output.c

    rfacacc71 r46577995  
    8080static void srv_yield(ipc_callid_t iid, ipc_call_t *icall)
    8181{
    82         int ret = EOK;
     82        errno_t ret = EOK;
    8383       
    8484        list_foreach(outdevs, link, outdev_t, dev) {
    8585                assert(dev->ops.yield);
    8686               
    87                 int rc = dev->ops.yield(dev);
     87                errno_t rc = dev->ops.yield(dev);
    8888                if (rc != EOK)
    8989                        ret = rc;
     
    9595static void srv_claim(ipc_callid_t iid, ipc_call_t *icall)
    9696{
    97         int ret = EOK;
     97        errno_t ret = EOK;
    9898       
    9999        list_foreach(outdevs, link, outdev_t, dev) {
    100100                assert(dev->ops.claim);
    101101               
    102                 int rc = dev->ops.claim(dev);
     102                errno_t rc = dev->ops.claim(dev);
    103103                if (rc != EOK)
    104104                        ret = rc;
     
    170170        }
    171171       
    172         int rc = async_share_out_finalize(callid, &frontbuf->data);
     172        errno_t rc = async_share_out_finalize(callid, &frontbuf->data);
    173173        if ((rc != EOK) || (frontbuf->data == AS_MAP_FAILED)) {
    174174                free(frontbuf);
     
    467467        /* Register server */
    468468        async_set_fallback_port_handler(client_connection, NULL);
    469         int rc = loc_server_register(NAME);
     469        errno_t rc = loc_server_register(NAME);
    470470        if (rc != EOK) {
    471471                printf("%s: Unable to register driver\n", NAME);
Note: See TracChangeset for help on using the changeset viewer.