Commit f5774a21 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

replaced all xrealloc with realloc in tests

parent 41ab38ce
......@@ -333,7 +333,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
/ (size_t)nproma) * (size_t)nproma * varLevs;
if (varslice_size < chunkSize)
{
varslice = (double *)xrealloc(varslice, chunkSize * sizeof (var[0]));
varslice = (double *)realloc(varslice, chunkSize * sizeof (var[0]));
varslice_size = chunkSize;
}
modelRegionCompute(varslice, (int)varLevs, nlat, nlon,
......
......@@ -250,7 +250,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
#endif
if (varslice_size < (size_t)chunk)
{
varslice = (double *)xrealloc(varslice, (size_t)chunk * sizeof (var[0]));
varslice = (double *)realloc(varslice, (size_t)chunk * sizeof (var[0]));
varslice_size = (size_t)chunk;
}
modelRegionCompute(varslice, (size_t)start, (size_t)chunk,
......
......@@ -107,7 +107,7 @@ int
PPM_prime_factorization_32(uint32_t n, uint32_t **factors)
{
if (n <= 1) return 0;
uint32_t * restrict pfactors = xrealloc(*factors, 32 * sizeof (pfactors[0]));
uint32_t * restrict pfactors = realloc(*factors, 32 * sizeof (pfactors[0]));
size_t numFactors = 0;
uint32_t unfactored = n;
while (!(unfactored & 1))
......
......@@ -86,7 +86,7 @@ int main()
if ( gridsize*nlevel > datasize ) datasize = gridsize*nlevel;
}
data = (double *)xrealloc(data, datasize*sizeof(double));
data = (double *)realloc(data, datasize*sizeof(double));
memset(data, 0, datasize*sizeof(double));
taxisID = vlistInqTaxis(vlistID);
......
Markdown is supported
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