Changeset d5c1051 in mainline for uspace/lib/c/generic/inet
- Timestamp:
- 2017-12-20T22:25:34Z (8 years ago)
- 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)
- Location:
- uspace/lib/c/generic/inet
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inet/addr.c
r8610c2c rd5c1051 584 584 { 585 585 int rc; 586 int ret; 586 587 587 588 rc = ENOTSUP; … … 589 590 switch (addr->version) { 590 591 case ip_any: 591 r c= asprintf(bufp, "none");592 if (r c< 0)592 ret = asprintf(bufp, "none"); 593 if (ret < 0) 593 594 return ENOMEM; 594 595 rc = EOK; … … 618 619 { 619 620 int rc; 621 int ret; 620 622 char *astr; 621 623 … … 624 626 switch (naddr->version) { 625 627 case ip_any: 626 r c= asprintf(bufp, "none");627 if (r c< 0)628 ret = asprintf(bufp, "none"); 629 if (ret < 0) 628 630 return ENOMEM; 629 631 rc = EOK; … … 634 636 return ENOMEM; 635 637 636 r c= asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix);637 if (r c< 0) {638 ret = asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix); 639 if (ret < 0) { 638 640 free(astr); 639 641 return ENOMEM; … … 647 649 return ENOMEM; 648 650 649 r c= asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix);650 if (r c< 0) {651 ret = asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix); 652 if (ret < 0) { 651 653 free(astr); 652 654 return ENOMEM; -
uspace/lib/c/generic/inet/hostport.c
r8610c2c rd5c1051 140 140 { 141 141 int rc; 142 int ret; 142 143 char *astr, *str; 143 144 char *hstr = NULL; … … 154 155 hstr = astr; 155 156 } else { 156 r c= asprintf(&hstr, "[%s]", astr);157 if (r c< 0) {157 ret = asprintf(&hstr, "[%s]", astr); 158 if (ret < 0) { 158 159 free(astr); 159 160 return ENOMEM; … … 171 172 } 172 173 173 r c= asprintf(&str, "%s:%u", hstr, hp->port);174 if (r c< 0)174 ret = asprintf(&str, "%s:%u", hstr, hp->port); 175 if (ret < 0) 175 176 return ENOMEM; 176 177
Note:
See TracChangeset
for help on using the changeset viewer.