aboutsummaryrefslogtreecommitdiff
path: root/src/CheckpointRecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/CheckpointRecovery.c')
-rw-r--r--src/CheckpointRecovery.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c
index c5c04ff..15c0d93 100644
--- a/src/CheckpointRecovery.c
+++ b/src/CheckpointRecovery.c
@@ -17,7 +17,7 @@
#include "ioGH.h"
#include "ioutil_CheckpointRecovery.h"
-#include <assert.h>
+
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
@@ -244,12 +244,14 @@ char *IOUtil_AssembleFilename (const cGH *GH,
file_ioproc);
}
- assert (dir && basename && postfix && extension);
+ if (! (dir && basename && postfix && extension))
+ CCTK_VWarn (0, __LINE__, __FILE__,"IOUtil", "Directory, basename, postfix or extension error");
filenamelen = strlen (dir) + strlen (basename) + strlen (postfix) +
strlen (iteration_postfix) + strlen (filenumber_postfix) +
strlen (extension) + 2;
filename = malloc (filenamelen);
- assert (filename);
+ if (! (filename))
+ CCTK_VWarn (0, __LINE__, __FILE__,"IOUtil", "File name error");
snprintf (filename, filenamelen, "%s/%s%s%s%s%s", dir, basename, postfix,
iteration_postfix, filenumber_postfix, extension);