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

    rfacacc71 r46577995  
    7373 *
    7474 */
    75 int ntrans_add(addr128_t ip_addr, addr48_t mac_addr)
     75errno_t ntrans_add(addr128_t ip_addr, addr48_t mac_addr)
    7676{
    7777        inet_ntrans_t *ntrans;
     
    107107 *
    108108 */
    109 int ntrans_remove(addr128_t ip_addr)
     109errno_t ntrans_remove(addr128_t ip_addr)
    110110{
    111111        inet_ntrans_t *ntrans;
     
    134134 *
    135135 */
    136 int ntrans_lookup(addr128_t ip_addr, addr48_t mac_addr)
     136errno_t ntrans_lookup(addr128_t ip_addr, addr48_t mac_addr)
    137137{
    138138        fibril_mutex_lock(&ntrans_list_lock);
     
    156156 *
    157157 */
    158 int ntrans_wait_timeout(suseconds_t timeout)
     158errno_t ntrans_wait_timeout(suseconds_t timeout)
    159159{
    160160        fibril_mutex_lock(&ntrans_list_lock);
    161         int rc = fibril_condvar_wait_timeout(&ntrans_cv, &ntrans_list_lock,
     161        errno_t rc = fibril_condvar_wait_timeout(&ntrans_cv, &ntrans_list_lock,
    162162            timeout);
    163163        fibril_mutex_unlock(&ntrans_list_lock);
Note: See TracChangeset for help on using the changeset viewer.