Changes in uspace/lib/c/generic/inet/addr.c [d5c1051:16bfcd3] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inet/addr.c
rd5c1051 r16bfcd3 39 39 #include <stdio.h> 40 40 #include <stddef.h> 41 #include < stdlib.h>41 #include <malloc.h> 42 42 #include <bitops.h> 43 43 #include <inttypes.h> … … 584 584 { 585 585 int rc; 586 int ret;587 586 588 587 rc = ENOTSUP; … … 590 589 switch (addr->version) { 591 590 case ip_any: 592 r et= asprintf(bufp, "none");593 if (r et< 0)591 rc = asprintf(bufp, "none"); 592 if (rc < 0) 594 593 return ENOMEM; 595 594 rc = EOK; … … 619 618 { 620 619 int rc; 621 int ret;622 620 char *astr; 623 621 … … 626 624 switch (naddr->version) { 627 625 case ip_any: 628 r et= asprintf(bufp, "none");629 if (r et< 0)626 rc = asprintf(bufp, "none"); 627 if (rc < 0) 630 628 return ENOMEM; 631 629 rc = EOK; … … 636 634 return ENOMEM; 637 635 638 r et= asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix);639 if (r et< 0) {636 rc = asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix); 637 if (rc < 0) { 640 638 free(astr); 641 639 return ENOMEM; … … 649 647 return ENOMEM; 650 648 651 r et= asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix);652 if (r et< 0) {649 rc = asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix); 650 if (rc < 0) { 653 651 free(astr); 654 652 return ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.