Commit 389aafbb authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

replace xcalloc() by Calloc()

parent 83af3d5e
......@@ -97,7 +97,7 @@ void pioInfoInit ( pioInfo_t * p )
void commInit ( void )
{
xassert ( info == 0 );
info = xcalloc(1, sizeof (pioInfo_t));
info = Calloc(1, sizeof (pioInfo_t));
pioInfoInit ( info );
}
......@@ -592,7 +592,7 @@ void commEvalPhysNodes ( void )
// define nodeSizes
info->nodeInfo.nNodes = nNodes;
info->nodeSizes = xcalloc((size_t)info->nodeInfo.nNodes,
info->nodeSizes = Calloc((size_t)info->nodeInfo.nNodes,
sizeof (info->nodeSizes[0]));
collID = 0;
for ( IOID = 0; IOID < info->nProcsIO; IOID++ )
......
......@@ -267,7 +267,7 @@ varsMapNDeco(int nNodes, int *nodeSizes)
streamSizes[i] = streamInqNvars(resHs[i]);
nVars = sum_int((size_t)nStreams, streamSizes);
varSizes = xcalloc((size_t)nVars, sizeof (varSizes[0]));
varSizes = Calloc((size_t)nVars, sizeof (varSizes[0]));
varMapping = Malloc((size_t)nVars * sizeof (varMapping[0]));
for (unsigned i = 0; i < nStreams; i++ )
......@@ -355,7 +355,7 @@ modelWinDefBufferSizes(void)
unsigned nstreams = reshCountType ( &streamOps );
streamIndexList = Malloc((size_t)nstreams * sizeof (streamIndexList[0]));
collIndex = xcalloc((size_t)nProcsColl, sizeof (collIndex[0]));
collIndex = Calloc((size_t)nProcsColl, sizeof (collIndex[0]));
reshGetResHListOfType ( nstreams, streamIndexList, &streamOps );
for (unsigned streamNo = 0; streamNo < nstreams; streamNo++ )
{
......@@ -455,7 +455,7 @@ void modelWinCreate ( void )
int nProcsColl = commInqNProcsColl ();
xdebug("%s", "START");
txWin = xcalloc((size_t)nProcsColl, sizeof (txWin[0]));
txWin = Calloc((size_t)nProcsColl, sizeof (txWin[0]));
modelWinDefBufferSizes ();
ranks[0] = commInqNProcsModel ();
......
......@@ -68,7 +68,7 @@ initBFiledataPA(char *filename, size_t bs, int nc)
dbuffer_init(&(bfd->fb), (size_t)nPrefStreams * bs);
bfd->ctrlBlks = xcalloc((size_t)nPrefStreams, sizeof (bfd->ctrlBlks[0]));
bfd->ctrlBlks = Calloc((size_t)nPrefStreams, sizeof (bfd->ctrlBlks[0]));
for (int i = 0; i < nPrefStreams; i++ )
{
......@@ -227,7 +227,7 @@ void pioWriterAIO(void)
xdebug ( "nProcsCollNode=%d on this node", nProcsCollNode );
bibBFiledataPA = listSetNew(destroyBFiledataPA, compareNamesBPA);
sentFinalize = xcalloc((size_t)nProcsCollNode, sizeof (sentFinalize[0]));
sentFinalize = Calloc((size_t)nProcsCollNode, sizeof (sentFinalize[0]));
for ( ;; )
{
......
......@@ -71,7 +71,7 @@ static aFiledataPF *initAFiledataPF ( const char *key, size_t bs)
int iret;
len = strlen(key);
afd = xcalloc(1, sizeof (*afd) + len + 1);
afd = Calloc(1, sizeof (*afd) + len + 1);
strcpy(afd->name, key);
afd->tsID = 0;
......@@ -103,7 +103,7 @@ initBFiledataPF(int fileID, int nc)
{
bFiledataPF *bfd;
size_t bfdSize = sizeof (bFiledataPF) + (size_t)nc * sizeof (bool);
bfd = xcalloc(1, bfdSize);
bfd = Calloc(1, bfdSize);
bfd->offset = 0;
bfd->finished = false;
bfd->fileID = fileID;
......@@ -175,7 +175,7 @@ fpgPOSIXFPGUARDSENDRECV(void)
xdebug ( "ncollectors=%d on this node", nProcsCollNode );
bibBFiledataPF = listSetNew( destroyBFiledataPF, fileIDCmpB);
sentFinalize = xcalloc((size_t)nProcsCollNode, sizeof (sentFinalize[0]));
sentFinalize = Calloc((size_t)nProcsCollNode, sizeof (sentFinalize[0]));
for ( ;; )
{
......
......@@ -140,7 +140,7 @@ pioWriterStdIO(void)
xdebug ( "ncollectors=%d on this node", nProcsCollNode );
bibBFiledataP = listSetNew(destroyBFiledataP, compareNamesBP);
sentFinalize = xcalloc((size_t)nProcsCollNode, sizeof (sentFinalize[0]));
sentFinalize = Calloc((size_t)nProcsCollNode, sizeof (sentFinalize[0]));
for ( ;; )
{
......
......@@ -167,7 +167,7 @@ serverWinCreate(void)
xmpi ( MPI_Comm_group ( commCalc, &groupCalc ));
xmpi ( MPI_Group_excl ( groupCalc, 1, ranks, &groupModel ));
rxWin = xcalloc((size_t)nProcsModel, sizeof (rxWin[0]));
rxWin = Calloc((size_t)nProcsModel, sizeof (rxWin[0]));
size_t totalBufferSize = collDefBufferSizes();
rxWin[0].buffer = (unsigned char*) Malloc(totalBufferSize);
size_t ofs = 0;
......@@ -1064,7 +1064,7 @@ void cdiPioServer(void (*postCommSetupActions)(void))
numPioPrimes = PPM_prime_factorization_32((uint32_t)commInqSizeColl(),
&pioPrimes);
#elif defined (HAVE_LIBNETCDF)
cdiSerialOpenFileCount = xcalloc(sizeof (cdiSerialOpenFileCount[0]),
cdiSerialOpenFileCount = Calloc(sizeof (cdiSerialOpenFileCount[0]),
(size_t)commInqSizeColl());
namespaceSwitchSet(NSSWITCH_STREAM_OPEN_BACKEND,
NSSW_FUNC(cdiPioStreamCDFOpenWrap));
......
......@@ -118,7 +118,7 @@ listInitResources(int nsp)
xassert(nsp < resHListSize && nsp >= 0);
int size = resHList[nsp].size = MIN_LIST_SIZE;
xassert(resHList[nsp].resources == NULL);
resHList[nsp].resources = (listElem_t*) xcalloc(MIN_LIST_SIZE, sizeof(listElem_t));
resHList[nsp].resources = (listElem_t*) Calloc(MIN_LIST_SIZE, sizeof(listElem_t));
listElem_t *p = resHList[nsp].resources;
for (int i = 0; i < size; i++ )
......@@ -620,7 +620,7 @@ void reshPackBufferCreate(char **packBuffer, int *packBufferSize, void *context)
int nsp = namespaceGetActive ();
int pBSize = *packBufferSize = getPackBufferSize(context);
char *pB = *packBuffer = (char *)xcalloc(1, (size_t)pBSize);
char *pB = *packBuffer = (char *) Calloc(1, (size_t)pBSize);
{
int header[resHPackHeaderNInt] = { START, nsp };
......
......@@ -800,7 +800,7 @@ void vlistMerge(int vlistID2, int vlistID1)
vars1[varID].levinfo[levID].mlevelID = nlevs2 + levID;
}
int *lvar = (int *)xcalloc((size_t)nvars2, sizeof(int));
int *lvar = (int *) Calloc((size_t)nvars2, sizeof(int));
for ( varID = 0; varID < nvars2; varID++ )
{
......
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