From 3080df7a41c2b5d73166540d2b49f64854f6d8dc Mon Sep 17 00:00:00 2001 From: hinder Date: Mon, 7 Jan 2013 09:53:51 +0000 Subject: Add TODO item relating to checking the return value of CCTK_ParameterFilename git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@294 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a --- src/Startup.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Startup.c b/src/Startup.c index 7bb69ca..3acba9f 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -95,6 +95,13 @@ int IOUtil_Startup (void) /* advertise the parameter file */ parfile[0] = 0; + + /* TODO: check the returned size; the function silently truncates + * the filename if it doesn't fit in the buffer; I can't think of a + * situation where this is useful. Even better, modify + * CCTK_ParameterFilename to allocate memory for the string, like + * many other Cactus functions do. */ + CCTK_ParameterFilename (sizeof (parfile), parfile); advertised_file.slice = ""; advertised_file.thorn = CCTK_THORNSTRING; -- cgit v1.2.3