From 1482fd202a63061f0e4afa619bb539afa0955265 Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 10 May 2005 11:21:01 +0000 Subject: 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 --- src/ChooseOutput.c | 4 ++-- 1 file 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; -- cgit v1.2.3