Ignore:
Timestamp:
Oct 10, 2005, 11:22:08 AM (14 years ago)
Author:
bcornec
Message:

Trunk: This version executes correctly mondoarchive
with the new memory management system (r57 didn't)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/common/libmondo-string.c

    r57 r58  
    122122{
    123123    char *pos_w_commas;
    124     char *output;
     124    static char output[MAX_STR_LEN];
    125125    char *tmp;
    126126    int j;
     
    145145        asprintf(&pos_w_commas, "%s", tmp);
    146146    }
    147     asprintf(&output, "%s", pos_w_commas);
     147    strcpy(output, pos_w_commas);
    148148    paranoid_free(pos_w_commas);
    149149    paranoid_free(tmp);
     
    250250    assert(width > 2);
    251251
    252     asprintf(&output, "%s", incoming);
     252    asprintf(output, "%s", incoming);
    253253    for (i = (int) strlen(output); i < width; i++) {
    254254        output[i] = ' ';
     
    707707    /*@ buffers ***************************************************** */
    708708    char *tmp;
     709    char *tmp1;
    709710
    710711    /*@ pointers **************************************************** */
     
    738739                in_out[i++] = ' ';
    739740            } else if (in_out[i] == '\r') {
    740                 paranoid_free(tmp);
    741                 asprintf(&tmp, "%s", in_out + i);
    742                 strcpy(in_out, tmp);
     741                asprintf(&tmp1, "%s", in_out + i);
     742                strcpy(in_out, tmp1);
     743                paranoid_free(tmp1);
    743744                i = -1;
    744745                continue;
Note: See TracChangeset for help on using the changeset viewer.