aboutsummaryrefslogtreecommitdiff
path: root/src/DumpVar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/DumpVar.c')
-rw-r--r--src/DumpVar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/DumpVar.c b/src/DumpVar.c
index e44f0d7..86fb5cc 100644
--- a/src/DumpVar.c
+++ b/src/DumpVar.c
@@ -66,7 +66,7 @@ static int GetHDF5type (StreamedHDF5GH *myGH, int vtype, hid_t *hdf5_type);
int StreamedHDF5_DumpVar (cGH *GH, int index, int timelevel, hid_t fid)
{
DECLARE_CCTK_PARAMETERS
- int i, vdim;
+ int vdim;
void *data;
int *hsizes;
hid_t hdf5_type;
@@ -331,7 +331,8 @@ static void StreamedHDF5_Dump (cGH *GH, int index, int timelevel, void *outme,
/* build the unique dataset name */
name = CCTK_FullName (index);
- datasetname = (char *) malloc (strlen (name) + 3);
+ datasetname = (char *) malloc (strlen (name) + 30); /* 30 chars should be
+ enough for 2 ints */
sprintf (datasetname, "%s@%d@%d", name, GH->cctk_iteration, timelevel);
free (name);