From acab2e3eb9cd8888708dac5dc1dde3189084920a Mon Sep 17 00:00:00 2001 From: yye00 Date: Thu, 12 Aug 2004 22:13:02 +0000 Subject: assert fix git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@215 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a --- src/CheckpointRecovery.c | 8 +++++--- 1 file 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 + #include #include #include @@ -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); -- cgit v1.2.3