Changeset 46577995 in mainline for uspace/srv/net/inetsrv/ndp.c


Ignore:
Timestamp:
2018-01-04T20:50:52Z (7 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/ndp.c

    rfacacc71 r46577995  
    6464}
    6565
    66 static int ndp_send_packet(inet_link_t *link, ndp_packet_t *packet)
     66static errno_t ndp_send_packet(inet_link_t *link, ndp_packet_t *packet)
    6767{
    6868        inet_dgram_t dgram;
     
    7777}
    7878
    79 static int ndp_router_advertisement(inet_dgram_t *dgram, inet_addr_t *router)
     79static errno_t ndp_router_advertisement(inet_dgram_t *dgram, inet_addr_t *router)
    8080{
    8181        // FIXME TODO
     
    8383}
    8484
    85 int ndp_received(inet_dgram_t *dgram)
     85errno_t ndp_received(inet_dgram_t *dgram)
    8686{
    8787        log_msg(LOG_DEFAULT, LVL_DEBUG, "ndp_received()");
    8888       
    8989        ndp_packet_t packet;
    90         int rc = ndp_pdu_decode(dgram, &packet);
     90        errno_t rc = ndp_pdu_decode(dgram, &packet);
    9191        if (rc != EOK)
    9292                return rc;
     
    151151 *
    152152 */
    153 int ndp_translate(addr128_t src_addr, addr128_t ip_addr, addr48_t mac_addr,
     153errno_t ndp_translate(addr128_t src_addr, addr128_t ip_addr, addr48_t mac_addr,
    154154    inet_link_t *ilink)
    155155{
     
    160160        }
    161161       
    162         int rc = ntrans_lookup(ip_addr, mac_addr);
     162        errno_t rc = ntrans_lookup(ip_addr, mac_addr);
    163163        if (rc == EOK)
    164164                return EOK;
Note: See TracChangeset for help on using the changeset viewer.