Changeset 46577995 in mainline for uspace/srv/net/ethip/atrans.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/net/ethip/atrans.c

    rfacacc71 r46577995  
    5959}
    6060
    61 int atrans_add(addr32_t ip_addr, addr48_t mac_addr)
     61errno_t atrans_add(addr32_t ip_addr, addr48_t mac_addr)
    6262{
    6363        ethip_atrans_t *atrans;
     
    8585}
    8686
    87 int atrans_remove(addr32_t ip_addr)
     87errno_t atrans_remove(addr32_t ip_addr)
    8888{
    8989        ethip_atrans_t *atrans;
     
    103103}
    104104
    105 static int atrans_lookup_locked(addr32_t ip_addr, addr48_t mac_addr)
     105static errno_t atrans_lookup_locked(addr32_t ip_addr, addr48_t mac_addr)
    106106{
    107107        ethip_atrans_t *atrans = atrans_find(ip_addr);
     
    113113}
    114114
    115 int atrans_lookup(addr32_t ip_addr, addr48_t mac_addr)
     115errno_t atrans_lookup(addr32_t ip_addr, addr48_t mac_addr)
    116116{
    117         int rc;
     117        errno_t rc;
    118118
    119119        fibril_mutex_lock(&atrans_list_lock);
     
    134134}
    135135
    136 int atrans_lookup_timeout(addr32_t ip_addr, suseconds_t timeout,
     136errno_t atrans_lookup_timeout(addr32_t ip_addr, suseconds_t timeout,
    137137    addr48_t mac_addr)
    138138{
    139139        fibril_timer_t *t;
    140140        bool timedout;
    141         int rc;
     141        errno_t rc;
    142142
    143143        t = fibril_timer_create(NULL);
Note: See TracChangeset for help on using the changeset viewer.