Changeset d5c1051 in mainline for uspace/lib/c/generic/inet/hostport.c


Ignore:
Timestamp:
2017-12-20T22:25:34Z (6 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:
39b54fe
Parents:
8610c2c
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:22:29)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:25:34)
Message:

"Obviously harmless" error handling tweaks.

File:
1 edited

Legend:

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

    r8610c2c rd5c1051  
    140140{
    141141        int rc;
     142        int ret;
    142143        char *astr, *str;
    143144        char *hstr = NULL;
     
    154155                        hstr = astr;
    155156                } else {
    156                         rc = asprintf(&hstr, "[%s]", astr);
    157                         if (rc < 0) {
     157                        ret = asprintf(&hstr, "[%s]", astr);
     158                        if (ret < 0) {
    158159                                free(astr);
    159160                                return ENOMEM;
     
    171172        }
    172173
    173         rc = asprintf(&str, "%s:%u", hstr, hp->port);
    174         if (rc < 0)
     174        ret = asprintf(&str, "%s:%u", hstr, hp->port);
     175        if (ret < 0)
    175176                return ENOMEM;
    176177
Note: See TracChangeset for help on using the changeset viewer.