diff options
author | tradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2005-05-10 11:21:01 +0000 |
---|---|---|
committer | tradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2005-05-10 11:21:01 +0000 |
commit | 1482fd202a63061f0e4afa619bb539afa0955265 (patch) | |
tree | 4043629f1245578f687fd8c779fff626c9651dbd | |
parent | 0066a4b8b35811bc0837bc2526c881984ac04de0 (diff) |
Fully initialise slice center variables.
This closes PR CactusBase/1925: "Origin handling in ASCII I/O uses
uninitialised values".
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@190 94b1c47f-dcfd-45ef-a468-0854c0e9e350
-rw-r--r-- | src/ChooseOutput.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ChooseOutput.c b/src/ChooseOutput.c index b198422..0ccddf6 100644 --- a/src/ChooseOutput.c +++ b/src/ChooseOutput.c @@ -71,10 +71,10 @@ void IOASCII_Choose1D (const cGH *GH) /* allocate arrays for origins */ - origin_phys[0] = malloc (3 * 3 * sizeof (CCTK_REAL)); + origin_phys[0] = calloc (3 * 3, sizeof (CCTK_REAL)); origin_phys[1] = origin_phys[0] + 3; origin_phys[2] = origin_phys[1] + 3; - origin_index[0] = malloc (3 * 3 * sizeof (int)); + origin_index[0] = calloc (3 * 3, sizeof (int)); origin_index[1] = origin_index[0] + 3; origin_index[2] = origin_index[1] + 3; |