Commit 5307de13 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix implicit conversions in iegScanTimestep(1).

parent 6994a6ab
......@@ -902,10 +902,11 @@ void iegScanTimestep1(stream_t *streamptr)
{
streamptr->tsteps[0].recordSize = nrecords;
streamptr->tsteps[0].records =
(record_t *) realloc(streamptr->tsteps[0].records, nrecords*sizeof(record_t));
(record_t *)xrealloc(streamptr->tsteps[0].records,
(size_t)nrecords * sizeof (record_t));
}
streamptr->tsteps[0].recIDs = (int *) malloc(nrecords*sizeof(int));
streamptr->tsteps[0].recIDs = (int *)xmalloc((size_t)nrecords * sizeof (int));
streamptr->tsteps[0].nrecs = nrecords;
for ( recID = 0; recID < nrecords; recID++ )
streamptr->tsteps[0].recIDs[recID] = recID;
......@@ -968,7 +969,7 @@ int iegScanTimestep2(stream_t *streamptr)
cdi_create_records(streamptr, tsID);
nrecords = streamptr->tsteps[0].nallrecs;
streamptr->tsteps[1].recIDs = (int *) malloc(nrecords*sizeof(int));
streamptr->tsteps[1].recIDs = (int *)xmalloc((size_t)nrecords * sizeof(int));
streamptr->tsteps[1].nrecs = 0;
for ( recID = 0; recID < nrecords; recID++ )
streamptr->tsteps[1].recIDs[recID] = -1;
......@@ -1152,7 +1153,8 @@ long iegScanTimestep(stream_t *streamptr)
nrecs = streamptr->tsteps[1].nrecs;
streamptr->tsteps[tsID].nrecs = nrecs;
streamptr->tsteps[tsID].recIDs = (int *) malloc(nrecs*sizeof(int));
streamptr->tsteps[tsID].recIDs
= (int *)xmalloc((size_t)nrecs * sizeof (int));
for ( recID = 0; recID < nrecs; recID++ )
streamptr->tsteps[tsID].recIDs[recID] = streamptr->tsteps[1].recIDs[recID];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment