aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2007-02-23 21:57:35 +0000
committerschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2007-02-23 21:57:35 +0000
commitc6219b0d08451f48a937ddac8093cc9514363ce7 (patch)
tree9925065330157109959f103bcce531ff268c8349
parent24e51a0896f5d680d6281e24137d732136362c3d (diff)
Initialise useghosts before using it.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@52 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8
-rw-r--r--src/slab.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/slab.c b/src/slab.c
index 90feccf..72c0e5c 100644
--- a/src/slab.c
+++ b/src/slab.c
@@ -723,6 +723,22 @@ int Slab_MultiTransfer (cGH const * const cctkGH,
CCTK_TimerStartI (timer_init);
+ {
+ CCTK_INT tmp;
+ int const iret = Util_TableGetInt (options, &tmp, "useghosts");
+ if (iret == 1) {
+ /* There was an entry, use it */
+ useghosts = tmp;
+ } else if (iret == UTIL_ERROR_BAD_HANDLE
+ || iret == UTIL_ERROR_TABLE_NO_SUCH_KEY) {
+ /* There was no entry, use a default */
+ useghosts = 0;
+ } else {
+ /* Something went wrong, abort */
+ check (0);
+ }
+ }
+
check (dim <= SLAB_MAXDIM);
info = malloc (SLAB_MAXDIM * sizeof *info);
check (info);
@@ -854,22 +870,6 @@ int Slab_MultiTransfer (cGH const * const cctkGH,
}
}
- {
- CCTK_INT tmp;
- int const iret = Util_TableGetInt (options, &tmp, "useghosts");
- if (iret == 1) {
- /* There was an entry, use it */
- useghosts = tmp;
- } else if (iret == UTIL_ERROR_BAD_HANDLE
- || iret == UTIL_ERROR_TABLE_NO_SUCH_KEY) {
- /* There was no entry, use a default */
- useghosts = 0;
- } else {
- /* Something went wrong, abort */
- check (0);
- }
- }
-
ifcheck {
ifdebug fflush (stdout);
MPI_Barrier (comm);