Changeset 107


Ignore:
Timestamp:
Jan 12, 2010, 9:30:30 PM (14 years ago)
Author:
(none)
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • proiecte/Parallel-DT/R8/Src/getdata.c

    r32 r107  
    2929        ItemNo i = 0, j, ItemSpace = 0;
    3030        Description GetDescription();
     31        Description* Itemaux;
    3132
    3233        /*  Open data file  */
     
    4546                        if (ItemSpace) {
    4647                                ItemSpace += Inc;
    47                                 Item = (Description *) realloc(Item, ItemSpace
    48                                                 * sizeof(Description));
     48
     49                                Itemaux = (Description *) malloc(ItemSpace * sizeof(Description));
     50                                for(j = 0; j < MaxItem; j++){
     51                                        Itemaux[j] = Item[j];
     52                                }
     53                                free(Item);
     54                                Item = Itemaux;
     55
     56                                /*
     57                                Item = (Description *) realloc(Item, ItemSpace * sizeof(Description));
     58                                */
    4959                        } else {
    5060                                Item = (Description *) malloc((ItemSpace = Inc)
Note: See TracChangeset for help on using the changeset viewer.