Changes in uspace/lib/c/generic/inet/addr.c [16bfcd3:d5c1051] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inet/addr.c
r16bfcd3 rd5c1051 39 39 #include <stdio.h> 40 40 #include <stddef.h> 41 #include < malloc.h>41 #include <stdlib.h> 42 42 #include <bitops.h> 43 43 #include <inttypes.h> … … 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;
Note:
See TracChangeset
for help on using the changeset viewer.