diff options
-rw-r--r-- | src/SetupPGH.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/SetupPGH.c b/src/SetupPGH.c index 4abb52e..459c4f2 100644 --- a/src/SetupPGH.c +++ b/src/SetupPGH.c @@ -95,13 +95,13 @@ pGH *PUGH_SetupPGH (void *callerid, /* Allocate for myself */ - pughGH = (pGH *) malloc (sizeof (pGH)); + pughGH = malloc (sizeof (pGH)); /* Set an identifier for my parent */ pughGH->callerid = callerid; - pughGH->GFExtras = (pGExtras **) malloc (dim * sizeof (pGExtras *)); - pughGH->Connectivity = (pConnectivity **) malloc (dim*sizeof(pConnectivity*)); + pughGH->GFExtras = malloc (dim * sizeof (pGExtras *)); + pughGH->Connectivity = malloc (dim*sizeof(pConnectivity*)); /* Set the total number of processors */ Setup_nProcs (pughGH, dim); @@ -109,7 +109,7 @@ pGH *PUGH_SetupPGH (void *callerid, /* Set up connectivity and extras for each dimension */ for (idim = 1; idim <= dim; idim++) { - nprocs = (int *) malloc (idim * sizeof (int)); + nprocs = malloc (idim * sizeof (int)); PUGH_SetupDefaultTopology (idim, nprocs); @@ -451,7 +451,7 @@ int PUGH_Exit (cGH *GH, int retval) @returntype int @returndesc This function should never return. - But if it does it will return 0. + But if it does it will return the return code to abort with. @endreturndesc @@*/ int PUGH_Abort (cGH *GH, int retval) @@ -466,13 +466,12 @@ int PUGH_Abort (cGH *GH, int retval) #else /* avoid compiler warning about unused parameter */ GH = GH; - retval = retval; /* FIXME */ /*abort();*/ #endif - exit (0); - return (0); + exit (retval); + return (retval); } |