Changeset 8013637 in mainline for uspace/lib/c/generic/iplink.c


Ignore:
Timestamp:
2012-07-20T13:51:28Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8fccd42
Parents:
c5bff3c (diff), 7030bc9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

More mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/iplink.c

    rc5bff3c r8013637  
    4949    iplink_t **riplink)
    5050{
    51         iplink_t *iplink = NULL;
    52         int rc;
    53 
    54         iplink = calloc(1, sizeof(iplink_t));
     51        iplink_t *iplink = calloc(1, sizeof(iplink_t));
    5552        if (iplink == NULL)
    5653                return ENOMEM;
    57 
     54       
    5855        iplink->sess = sess;
    5956        iplink->ev_ops = ev_ops;
    60 
     57       
    6158        async_exch_t *exch = async_exchange_begin(sess);
    62 
    63         rc = async_connect_to_me(exch, 0, 0, 0, iplink_cb_conn, iplink);
     59       
     60        int rc = async_connect_to_me(exch, 0, 0, 0, iplink_cb_conn, iplink);
    6461        async_exchange_end(exch);
    65 
     62       
    6663        if (rc != EOK)
    6764                goto error;
    68 
     65       
    6966        *riplink = iplink;
    7067        return EOK;
    71 
     68       
    7269error:
    7370        if (iplink != NULL)
    7471                free(iplink);
    75 
     72       
    7673        return rc;
    7774}
Note: See TracChangeset for help on using the changeset viewer.