Changeset b7fd2a0 in mainline for uspace/lib/c/generic/inet


Ignore:
Timestamp:
2018-01-13T03:10:29Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a53ed3a
Parents:
36f0738
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.

Although this is a massive commit, it is a simple text replacement, and thus
is very easy to verify. Simply do the following:

`
git checkout <this commit's hash>
git reset HEAD
git add .
tools/srepl '\berrno_t\b' int
git add .
tools/srepl '\bsys_errno_t\b' sysarg_t
git reset
git diff
`

While this doesn't ensure that the replacements are correct, it does ensure
that the commit doesn't do anything except those replacements. Since errno_t
is typedef'd to int in the usual case (and sys_errno_t to sysarg_t), even if
incorrect, this commit cannot change behavior.

Location:
uspace/lib/c/generic/inet
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/inet/addr.c

    r36f0738 rb7fd2a0  
    290290}
    291291
    292 static int inet_addr_parse_v4(const char *str, inet_addr_t *raddr,
     292static errno_t inet_addr_parse_v4(const char *str, inet_addr_t *raddr,
    293293    int *prefix, char **endptr)
    294294{
     
    299299
    300300        while (i < 4) {
    301                 int rc = str_uint8_t(cur, (const char **)&cur, 10, false, &b);
     301                errno_t rc = str_uint8_t(cur, (const char **)&cur, 10, false, &b);
    302302                if (rc != EOK)
    303303                        return rc;
     
    339339}
    340340
    341 static int inet_addr_parse_v6(const char *str, inet_addr_t *raddr, int *prefix,
     341static errno_t inet_addr_parse_v6(const char *str, inet_addr_t *raddr, int *prefix,
    342342    char **endptr)
    343343{
     
    362362                uint16_t bioctet;
    363363                const char *gend;
    364                 int rc = str_uint16_t(cur, &gend, 16, false, &bioctet);
     364                errno_t rc = str_uint16_t(cur, &gend, 16, false, &bioctet);
    365365                if (rc != EOK)
    366366                        break;
     
    446446 *
    447447 */
    448 int inet_addr_parse(const char *text, inet_addr_t *addr, char **endptr)
    449 {
    450         int rc;
     448errno_t inet_addr_parse(const char *text, inet_addr_t *addr, char **endptr)
     449{
     450        errno_t rc;
    451451
    452452        rc = inet_addr_parse_v4(text, addr, NULL, endptr);
     
    473473 *
    474474 */
    475 int inet_naddr_parse(const char *text, inet_naddr_t *naddr, char **endptr)
    476 {
    477         int rc;
     475errno_t inet_naddr_parse(const char *text, inet_naddr_t *naddr, char **endptr)
     476{
     477        errno_t rc;
    478478        inet_addr_t addr;
    479479        int prefix;
     
    494494}
    495495
    496 static int inet_addr_format_v4(addr32_t addr, char **bufp)
     496static errno_t inet_addr_format_v4(addr32_t addr, char **bufp)
    497497{
    498498        int rc;
     
    506506}
    507507
    508 static int inet_addr_format_v6(const addr128_t addr, char **bufp)
     508static errno_t inet_addr_format_v6(const addr128_t addr, char **bufp)
    509509{
    510510        *bufp = (char *) malloc(INET6_ADDRSTRLEN);
     
    581581 *
    582582 */
    583 int inet_addr_format(const inet_addr_t *addr, char **bufp)
    584 {
    585         int rc;
     583errno_t inet_addr_format(const inet_addr_t *addr, char **bufp)
     584{
     585        errno_t rc;
    586586        int ret;
    587587
     
    616616 *
    617617 */
    618 int inet_naddr_format(const inet_naddr_t *naddr, char **bufp)
    619 {
    620         int rc;
     618errno_t inet_naddr_format(const inet_naddr_t *naddr, char **bufp)
     619{
     620        errno_t rc;
    621621        int ret;
    622622        char *astr;
  • uspace/lib/c/generic/inet/host.c

    r36f0738 rb7fd2a0  
    5454 *         extra characters at the end. ENOMEM if out of memory
    5555 */
    56 int inet_host_parse(const char *str, inet_host_t **rhost,
     56errno_t inet_host_parse(const char *str, inet_host_t **rhost,
    5757    char **endptr)
    5858{
     
    6161        char *name;
    6262        char *aend;
    63         int rc;
     63        errno_t rc;
    6464
    6565        host = calloc(1, sizeof(inet_host_t));
     
    106106 * @return EOK on success, ENOMEM if out of memory
    107107 */
    108 int inet_host_format(inet_host_t *host, char **rstr)
    109 {
    110         int rc;
     108errno_t inet_host_format(inet_host_t *host, char **rstr)
     109{
     110        errno_t rc;
    111111        char *str = NULL;
    112112
     
    161161 * @reutrn EOK on success, ENOENT on resolurion failure
    162162 */
    163 int inet_host_lookup_one(inet_host_t *host, ip_ver_t version, inet_addr_t *addr)
     163errno_t inet_host_lookup_one(inet_host_t *host, ip_ver_t version, inet_addr_t *addr)
    164164{
    165165        dnsr_hostinfo_t *hinfo = NULL;
    166         int rc;
     166        errno_t rc;
    167167
    168168        switch (host->hform) {
     
    201201 *         ENOMEM if out of memory
    202202 */
    203 int inet_host_plookup_one(const char *str, ip_ver_t version, inet_addr_t *addr,
     203errno_t inet_host_plookup_one(const char *str, ip_ver_t version, inet_addr_t *addr,
    204204    char **endptr, const char **errmsg)
    205205{
    206206        inet_host_t *host = NULL;
    207207        char *eptr;
    208         int rc;
     208        errno_t rc;
    209209
    210210        rc = inet_host_parse(str, &host, endptr != NULL ? &eptr : NULL);
  • uspace/lib/c/generic/inet/hostname.c

    r36f0738 rb7fd2a0  
    5858 *         extra characters at the end. ENOMEM if out of memory
    5959 */
    60 int inet_hostname_parse(const char *str, char **rname, char **endptr)
     60errno_t inet_hostname_parse(const char *str, char **rname, char **endptr)
    6161{
    6262        const char *c;
  • uspace/lib/c/generic/inet/hostport.c

    r36f0738 rb7fd2a0  
    5656 *         extra characters at the end. ENOMEM if out of memory
    5757 */
    58 int inet_hostport_parse(const char *str, inet_hostport_t **rhp,
     58errno_t inet_hostport_parse(const char *str, inet_hostport_t **rhp,
    5959    char **endptr)
    6060{
     
    6565        char *aend;
    6666        const char *pend;
    67         int rc;
     67        errno_t rc;
    6868
    6969        hp = calloc(1, sizeof(inet_hostport_t));
     
    137137 * @return EOK on success, ENOMEM if out of memory
    138138 */
    139 int inet_hostport_format(inet_hostport_t *hp, char **rstr)
    140 {
    141         int rc;
     139errno_t inet_hostport_format(inet_hostport_t *hp, char **rstr)
     140{
     141        errno_t rc;
    142142        int ret;
    143143        char *astr, *str;
     
    211211 * @return EOK on success, ENOENT on resolution failure
    212212 */
    213 int inet_hostport_lookup_one(inet_hostport_t *hp, ip_ver_t version,
     213errno_t inet_hostport_lookup_one(inet_hostport_t *hp, ip_ver_t version,
    214214    inet_ep_t *ep)
    215215{
    216216        dnsr_hostinfo_t *hinfo = NULL;
    217         int rc;
     217        errno_t rc;
    218218
    219219        inet_ep_init(ep);
     
    255255 *         ENOMEM if out of memory
    256256 */
    257 int inet_hostport_plookup_one(const char *str, ip_ver_t version, inet_ep_t *ep,
     257errno_t inet_hostport_plookup_one(const char *str, ip_ver_t version, inet_ep_t *ep,
    258258    char **endptr, const char **errmsg)
    259259{
    260260        inet_hostport_t *hp = NULL;
    261261        char *eptr;
    262         int rc;
     262        errno_t rc;
    263263
    264264        rc = inet_hostport_parse(str, &hp, endptr != NULL ? &eptr : NULL);
  • uspace/lib/c/generic/inet/tcp.c

    r36f0738 rb7fd2a0  
    4242
    4343static void tcp_cb_conn(ipc_callid_t, ipc_call_t *, void *);
    44 static int tcp_conn_fibril(void *);
     44static errno_t tcp_conn_fibril(void *);
    4545
    4646/** Incoming TCP connection info
     
    6161 * @return EOK on success or an error code
    6262 */
    63 static int tcp_callback_create(tcp_t *tcp)
     63static errno_t tcp_callback_create(tcp_t *tcp)
    6464{
    6565        async_exch_t *exch = async_exchange_begin(tcp->sess);
     
    6868       
    6969        port_id_t port;
    70         int rc = async_create_callback_port(exch, INTERFACE_TCP_CB, 0, 0,
     70        errno_t rc = async_create_callback_port(exch, INTERFACE_TCP_CB, 0, 0,
    7171            tcp_cb_conn, tcp, &port);
    7272       
     
    7676                return rc;
    7777
    78         int retval;
     78        errno_t retval;
    7979        async_wait_for(req, &retval);
    8080
     
    8888 *         cannot be contacted
    8989 */
    90 int tcp_create(tcp_t **rtcp)
     90errno_t tcp_create(tcp_t **rtcp)
    9191{
    9292        tcp_t *tcp;
    9393        service_id_t tcp_svcid;
    94         int rc;
     94        errno_t rc;
    9595
    9696        tcp = calloc(1, sizeof(tcp_t));
     
    161161 * @return EOK on success, ENOMEM if out of memory
    162162 */
    163 static int tcp_conn_new(tcp_t *tcp, sysarg_t id, tcp_cb_t *cb, void *arg,
     163static errno_t tcp_conn_new(tcp_t *tcp, sysarg_t id, tcp_cb_t *cb, void *arg,
    164164    tcp_conn_t **rconn)
    165165{
     
    207207 * @return EOK on success or an error code.
    208208 */
    209 int tcp_conn_create(tcp_t *tcp, inet_ep2_t *epp, tcp_cb_t *cb, void *arg,
     209errno_t tcp_conn_create(tcp_t *tcp, inet_ep2_t *epp, tcp_cb_t *cb, void *arg,
    210210    tcp_conn_t **rconn)
    211211{
     
    216216        exch = async_exchange_begin(tcp->sess);
    217217        aid_t req = async_send_0(exch, TCP_CONN_CREATE, &answer);
    218         int rc = async_data_write_start(exch, (void *)epp,
     218        errno_t rc = async_data_write_start(exch, (void *)epp,
    219219            sizeof(inet_ep2_t));
    220220        async_exchange_end(exch);
    221221
    222222        if (rc != EOK) {
    223                 int rc_orig;
     223                errno_t rc_orig;
    224224                async_wait_for(req, &rc_orig);
    225225                if (rc_orig != EOK)
     
    240240        return EOK;
    241241error:
    242         return (int) rc;
     242        return (errno_t) rc;
    243243}
    244244
     
    260260
    261261        exch = async_exchange_begin(conn->tcp->sess);
    262         int rc = async_req_1_0(exch, TCP_CONN_DESTROY, conn->id);
     262        errno_t rc = async_req_1_0(exch, TCP_CONN_DESTROY, conn->id);
    263263        async_exchange_end(exch);
    264264
     
    275275 * @return EOK on success, EINVAL if no connection with the given ID exists
    276276 */
    277 static int tcp_conn_get(tcp_t *tcp, sysarg_t id, tcp_conn_t **rconn)
     277static errno_t tcp_conn_get(tcp_t *tcp, sysarg_t id, tcp_conn_t **rconn)
    278278{
    279279        list_foreach(tcp->conn, ltcp, tcp_conn_t, conn) {
     
    318318 * @return EOK on success or an error code
    319319 */
    320 int tcp_listener_create(tcp_t *tcp, inet_ep_t *ep, tcp_listen_cb_t *lcb,
     320errno_t tcp_listener_create(tcp_t *tcp, inet_ep_t *ep, tcp_listen_cb_t *lcb,
    321321    void *larg, tcp_cb_t *cb, void *arg, tcp_listener_t **rlst)
    322322{
     
    331331        exch = async_exchange_begin(tcp->sess);
    332332        aid_t req = async_send_0(exch, TCP_LISTENER_CREATE, &answer);
    333         int rc = async_data_write_start(exch, (void *)ep,
     333        errno_t rc = async_data_write_start(exch, (void *)ep,
    334334            sizeof(inet_ep_t));
    335335        async_exchange_end(exch);
    336336
    337337        if (rc != EOK) {
    338                 int rc_orig;
     338                errno_t rc_orig;
    339339                async_wait_for(req, &rc_orig);
    340340                if (rc_orig != EOK)
     
    360360error:
    361361        free(lst);
    362         return (int) rc;
     362        return (errno_t) rc;
    363363}
    364364
     
    377377
    378378        exch = async_exchange_begin(lst->tcp->sess);
    379         int rc = async_req_1_0(exch, TCP_LISTENER_DESTROY, lst->id);
     379        errno_t rc = async_req_1_0(exch, TCP_LISTENER_DESTROY, lst->id);
    380380        async_exchange_end(exch);
    381381
     
    392392 * @return EOK on success, EINVAL if no listener with the given ID is found
    393393 */
    394 static int tcp_listener_get(tcp_t *tcp, sysarg_t id, tcp_listener_t **rlst)
     394static errno_t tcp_listener_get(tcp_t *tcp, sysarg_t id, tcp_listener_t **rlst)
    395395{
    396396        list_foreach(tcp->listener, ltcp, tcp_listener_t, lst) {
     
    424424 * @return EOK if connection is established, EIO otherwise
    425425 */
    426 int tcp_conn_wait_connected(tcp_conn_t *conn)
     426errno_t tcp_conn_wait_connected(tcp_conn_t *conn)
    427427{
    428428        fibril_mutex_lock(&conn->lock);
     
    448448 * @return EOK on success or an error code
    449449 */
    450 int tcp_conn_send(tcp_conn_t *conn, const void *data, size_t bytes)
    451 {
    452         async_exch_t *exch;
    453         int rc;
     450errno_t tcp_conn_send(tcp_conn_t *conn, const void *data, size_t bytes)
     451{
     452        async_exch_t *exch;
     453        errno_t rc;
    454454
    455455        exch = async_exchange_begin(conn->tcp->sess);
     
    480480 * @return EOK on success or an error code
    481481 */
    482 int tcp_conn_send_fin(tcp_conn_t *conn)
     482errno_t tcp_conn_send_fin(tcp_conn_t *conn)
    483483{
    484484        async_exch_t *exch;
    485485
    486486        exch = async_exchange_begin(conn->tcp->sess);
    487         int rc = async_req_1_0(exch, TCP_CONN_SEND_FIN, conn->id);
     487        errno_t rc = async_req_1_0(exch, TCP_CONN_SEND_FIN, conn->id);
    488488        async_exchange_end(exch);
    489489
     
    496496 * @return EOK on success or an error code
    497497 */
    498 int tcp_conn_push(tcp_conn_t *conn)
     498errno_t tcp_conn_push(tcp_conn_t *conn)
    499499{
    500500        async_exch_t *exch;
    501501
    502502        exch = async_exchange_begin(conn->tcp->sess);
    503         int rc = async_req_1_0(exch, TCP_CONN_PUSH, conn->id);
     503        errno_t rc = async_req_1_0(exch, TCP_CONN_PUSH, conn->id);
    504504        async_exchange_end(exch);
    505505
     
    512512 * @return EOK on success or an error code
    513513 */
    514 int tcp_conn_reset(tcp_conn_t *conn)
     514errno_t tcp_conn_reset(tcp_conn_t *conn)
    515515{
    516516        async_exch_t *exch;
    517517
    518518        exch = async_exchange_begin(conn->tcp->sess);
    519         int rc = async_req_1_0(exch, TCP_CONN_RESET, conn->id);
     519        errno_t rc = async_req_1_0(exch, TCP_CONN_RESET, conn->id);
    520520        async_exchange_end(exch);
    521521
     
    540540 *         error code in case of other error
    541541 */
    542 int tcp_conn_recv(tcp_conn_t *conn, void *buf, size_t bsize, size_t *nrecv)
     542errno_t tcp_conn_recv(tcp_conn_t *conn, void *buf, size_t bsize, size_t *nrecv)
    543543{
    544544        async_exch_t *exch;
     
    553553        exch = async_exchange_begin(conn->tcp->sess);
    554554        aid_t req = async_send_1(exch, TCP_CONN_RECV, conn->id, &answer);
    555         int rc = async_data_read_start(exch, buf, bsize);
     555        errno_t rc = async_data_read_start(exch, buf, bsize);
    556556        async_exchange_end(exch);
    557557
     
    562562        }
    563563
    564         int retval;
     564        errno_t retval;
    565565        async_wait_for(req, &retval);
    566566        if (retval != EOK) {
     
    588588 * @return EOK on success or an error code
    589589 */
    590 int tcp_conn_recv_wait(tcp_conn_t *conn, void *buf, size_t bsize,
     590errno_t tcp_conn_recv_wait(tcp_conn_t *conn, void *buf, size_t bsize,
    591591    size_t *nrecv)
    592592{
     
    602602        exch = async_exchange_begin(conn->tcp->sess);
    603603        aid_t req = async_send_1(exch, TCP_CONN_RECV_WAIT, conn->id, &answer);
    604         int rc = async_data_read_start(exch, buf, bsize);
     604        errno_t rc = async_data_read_start(exch, buf, bsize);
    605605        async_exchange_end(exch);
    606606
     
    616616        }
    617617
    618         int retval;
     618        errno_t retval;
    619619        async_wait_for(req, &retval);
    620620        if (retval != EOK) {
     
    641641        tcp_conn_t *conn;
    642642        sysarg_t conn_id;
    643         int rc;
     643        errno_t rc;
    644644
    645645        conn_id = IPC_GET_ARG1(*icall);
     
    669669        tcp_conn_t *conn;
    670670        sysarg_t conn_id;
    671         int rc;
     671        errno_t rc;
    672672
    673673        conn_id = IPC_GET_ARG1(*icall);
     
    697697        tcp_conn_t *conn;
    698698        sysarg_t conn_id;
    699         int rc;
     699        errno_t rc;
    700700
    701701        conn_id = IPC_GET_ARG1(*icall);
     
    725725        tcp_conn_t *conn;
    726726        sysarg_t conn_id;
    727         int rc;
     727        errno_t rc;
    728728
    729729        conn_id = IPC_GET_ARG1(*icall);
     
    769769        fid_t fid;
    770770        tcp_in_conn_t *cinfo;
    771         int rc;
     771        errno_t rc;
    772772
    773773        lst_id = IPC_GET_ARG1(*icall);
     
    863863 * @param arg Argument, incoming connection information (@c tcp_in_conn_t)
    864864 */
    865 static int tcp_conn_fibril(void *arg)
     865static errno_t tcp_conn_fibril(void *arg)
    866866{
    867867        tcp_in_conn_t *cinfo = (tcp_in_conn_t *)arg;
  • uspace/lib/c/generic/inet/udp.c

    r36f0738 rb7fd2a0  
    4848 * @return EOK on success or an error code
    4949 */
    50 static int udp_callback_create(udp_t *udp)
     50static errno_t udp_callback_create(udp_t *udp)
    5151{
    5252        async_exch_t *exch = async_exchange_begin(udp->sess);
     
    5555       
    5656        port_id_t port;
    57         int rc = async_create_callback_port(exch, INTERFACE_UDP_CB, 0, 0,
     57        errno_t rc = async_create_callback_port(exch, INTERFACE_UDP_CB, 0, 0,
    5858            udp_cb_conn, udp, &port);
    5959       
     
    6363                return rc;
    6464
    65         int retval;
     65        errno_t retval;
    6666        async_wait_for(req, &retval);
    6767
     
    7575 *         cannot be contacted
    7676 */
    77 int udp_create(udp_t **rudp)
     77errno_t udp_create(udp_t **rudp)
    7878{
    7979        udp_t *udp;
    8080        service_id_t udp_svcid;
    81         int rc;
     81        errno_t rc;
    8282
    8383        udp = calloc(1, sizeof(udp_t));
     
    160160 * @return EOK on success or an error code.
    161161 */
    162 int udp_assoc_create(udp_t *udp, inet_ep2_t *epp, udp_cb_t *cb, void *arg,
     162errno_t udp_assoc_create(udp_t *udp, inet_ep2_t *epp, udp_cb_t *cb, void *arg,
    163163    udp_assoc_t **rassoc)
    164164{
     
    173173        exch = async_exchange_begin(udp->sess);
    174174        aid_t req = async_send_0(exch, UDP_ASSOC_CREATE, &answer);
    175         int rc = async_data_write_start(exch, (void *)epp,
     175        errno_t rc = async_data_write_start(exch, (void *)epp,
    176176            sizeof(inet_ep2_t));
    177177        async_exchange_end(exch);
    178178
    179179        if (rc != EOK) {
    180                 int rc_orig;
     180                errno_t rc_orig;
    181181                async_wait_for(req, &rc_orig);
    182182                if (rc_orig != EOK)
     
    200200error:
    201201        free(assoc);
    202         return (int) rc;
     202        return (errno_t) rc;
    203203}
    204204
     
    220220
    221221        exch = async_exchange_begin(assoc->udp->sess);
    222         int rc = async_req_1_0(exch, UDP_ASSOC_DESTROY, assoc->id);
     222        errno_t rc = async_req_1_0(exch, UDP_ASSOC_DESTROY, assoc->id);
    223223        async_exchange_end(exch);
    224224
     
    232232 * @param flags Flags
    233233 */
    234 int udp_assoc_set_nolocal(udp_assoc_t *assoc)
     234errno_t udp_assoc_set_nolocal(udp_assoc_t *assoc)
    235235{
    236236        async_exch_t *exch;
    237237
    238238        exch = async_exchange_begin(assoc->udp->sess);
    239         int rc = async_req_1_0(exch, UDP_ASSOC_SET_NOLOCAL, assoc->id);
     239        errno_t rc = async_req_1_0(exch, UDP_ASSOC_SET_NOLOCAL, assoc->id);
    240240        async_exchange_end(exch);
    241241
     
    252252 * @return EOK on success or an error code
    253253 */
    254 int udp_assoc_send_msg(udp_assoc_t *assoc, inet_ep_t *dest, void *data,
     254errno_t udp_assoc_send_msg(udp_assoc_t *assoc, inet_ep_t *dest, void *data,
    255255    size_t bytes)
    256256{
     
    260260        aid_t req = async_send_1(exch, UDP_ASSOC_SEND_MSG, assoc->id, NULL);
    261261
    262         int rc = async_data_write_start(exch, (void *)dest,
     262        errno_t rc = async_data_write_start(exch, (void *)dest,
    263263            sizeof(inet_ep_t));
    264264        if (rc != EOK) {
     
    318318 * @return EOK on success or an error code.
    319319 */
    320 int udp_rmsg_read(udp_rmsg_t *rmsg, size_t off, void *buf, size_t bsize)
     320errno_t udp_rmsg_read(udp_rmsg_t *rmsg, size_t off, void *buf, size_t bsize)
    321321{
    322322        async_exch_t *exch;
     
    325325        exch = async_exchange_begin(rmsg->udp->sess);
    326326        aid_t req = async_send_1(exch, UDP_RMSG_READ, off, &answer);
    327         int rc = async_data_read_start(exch, buf, bsize);
     327        errno_t rc = async_data_read_start(exch, buf, bsize);
    328328        async_exchange_end(exch);
    329329
     
    333333        }
    334334
    335         int retval;
     335        errno_t retval;
    336336        async_wait_for(req, &retval);
    337337        if (retval != EOK) {
     
    382382 * @return EOK on success or an error code
    383383 */
    384 static int udp_rmsg_info(udp_t *udp, udp_rmsg_t *rmsg)
     384static errno_t udp_rmsg_info(udp_t *udp, udp_rmsg_t *rmsg)
    385385{
    386386        async_exch_t *exch;
     
    390390        exch = async_exchange_begin(udp->sess);
    391391        aid_t req = async_send_0(exch, UDP_RMSG_INFO, &answer);
    392         int rc = async_data_read_start(exch, &ep, sizeof(inet_ep_t));
     392        errno_t rc = async_data_read_start(exch, &ep, sizeof(inet_ep_t));
    393393        async_exchange_end(exch);
    394394
     
    398398        }
    399399
    400         int retval;
     400        errno_t retval;
    401401        async_wait_for(req, &retval);
    402402        if (retval != EOK)
     
    415415 * @return EOK on success or an error code
    416416 */
    417 static int udp_rmsg_discard(udp_t *udp)
     417static errno_t udp_rmsg_discard(udp_t *udp)
    418418{
    419419        async_exch_t *exch;
    420420
    421421        exch = async_exchange_begin(udp->sess);
    422         int rc = async_req_0_0(exch, UDP_RMSG_DISCARD);
     422        errno_t rc = async_req_0_0(exch, UDP_RMSG_DISCARD);
    423423        async_exchange_end(exch);
    424424
     
    434434 * @return EOK on success, EINVAL if no association with the given ID exists
    435435 */
    436 static int udp_assoc_get(udp_t *udp, sysarg_t id, udp_assoc_t **rassoc)
     436static errno_t udp_assoc_get(udp_t *udp, sysarg_t id, udp_assoc_t **rassoc)
    437437{
    438438        list_foreach(udp->assoc, ludp, udp_assoc_t, assoc) {
     
    459459        udp_rmsg_t rmsg;
    460460        udp_assoc_t *assoc;
    461         int rc;
     461        errno_t rc;
    462462
    463463        while (true) {
Note: See TracChangeset for help on using the changeset viewer.