- Timestamp:
- Jan 12, 2010, 9:30:30 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
proiecte/Parallel-DT/R8/Src/getdata.c
r32 r107 29 29 ItemNo i = 0, j, ItemSpace = 0; 30 30 Description GetDescription(); 31 Description* Itemaux; 31 32 32 33 /* Open data file */ … … 45 46 if (ItemSpace) { 46 47 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 */ 49 59 } else { 50 60 Item = (Description *) malloc((ItemSpace = Inc)
Note: See TracChangeset
for help on using the changeset viewer.