aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryye00 <yye00@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2004-08-12 22:13:02 +0000
committeryye00 <yye00@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2004-08-12 22:13:02 +0000
commitacab2e3eb9cd8888708dac5dc1dde3189084920a (patch)
treed9ad5b05ac08c7a62f851a5159978d5e39fba305
parent214c27540f9f202f7c7ab019c3a39267ee840cf6 (diff)
assert fix
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@215 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-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);