Ignore:
File:
1 edited

Legend:

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

    r16bfcd3 rd5c1051  
    3939#include <stdio.h>
    4040#include <stddef.h>
    41 #include <malloc.h>
     41#include <stdlib.h>
    4242#include <bitops.h>
    4343#include <inttypes.h>
     
    584584{
    585585        int rc;
     586        int ret;
    586587
    587588        rc = ENOTSUP;
     
    589590        switch (addr->version) {
    590591        case ip_any:
    591                 rc = asprintf(bufp, "none");
    592                 if (rc < 0)
     592                ret = asprintf(bufp, "none");
     593                if (ret < 0)
    593594                        return ENOMEM;
    594595                rc = EOK;
     
    618619{
    619620        int rc;
     621        int ret;
    620622        char *astr;
    621623
     
    624626        switch (naddr->version) {
    625627        case ip_any:
    626                 rc = asprintf(bufp, "none");
    627                 if (rc < 0)
     628                ret = asprintf(bufp, "none");
     629                if (ret < 0)
    628630                        return ENOMEM;
    629631                rc = EOK;
     
    634636                        return ENOMEM;
    635637
    636                 rc = asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix);
    637                 if (rc < 0) {
     638                ret = asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix);
     639                if (ret < 0) {
    638640                        free(astr);
    639641                        return ENOMEM;
     
    647649                        return ENOMEM;
    648650
    649                 rc = asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix);
    650                 if (rc < 0) {
     651                ret = asprintf(bufp, "%s/%" PRIu8, astr, naddr->prefix);
     652                if (ret < 0) {
    651653                        free(astr);
    652654                        return ENOMEM;
Note: See TracChangeset for help on using the changeset viewer.