aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOStreamedHDF5/src/CarpetIOStreamedHDF5.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetIOStreamedHDF5/src/CarpetIOStreamedHDF5.cc')
-rw-r--r--Carpet/CarpetIOStreamedHDF5/src/CarpetIOStreamedHDF5.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/Carpet/CarpetIOStreamedHDF5/src/CarpetIOStreamedHDF5.cc b/Carpet/CarpetIOStreamedHDF5/src/CarpetIOStreamedHDF5.cc
index 92a47ff5a..bc3b38df5 100644
--- a/Carpet/CarpetIOStreamedHDF5/src/CarpetIOStreamedHDF5.cc
+++ b/Carpet/CarpetIOStreamedHDF5/src/CarpetIOStreamedHDF5.cc
@@ -3,7 +3,6 @@
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
-#include "util_String.h"
#include "util_Network.h"
#ifdef HAVE_SYS_TIME_H
@@ -189,22 +188,21 @@ static void CheckSteerableParameters (const cGH *const cctkGH,
// notify the user about the new setting
if (not CCTK_Equals (verbose, "none")) {
- char *msg = NULL;
+ int count = 0;
+ string msg ("Periodic streamed HDF5 output requested for '");
for (int i = CCTK_NumVars () - 1; i >= 0; i--) {
if (myGH->requests[i]) {
- char *fullname = CCTK_FullName (i);
- if (not msg) {
- Util_asprintf (&msg, "Periodic streamed HDF5 output requested "
- "for '%s'", fullname);
- } else {
- Util_asprintf (&msg, "%s, '%s'", msg, fullname);
+ if (count++) {
+ msg += "', '";
}
+ char *fullname = CCTK_FullName (i);
+ msg += fullname;
free (fullname);
}
}
- if (msg) {
- CCTK_INFO (msg);
- free (msg);
+ if (count) {
+ msg += "'";
+ CCTK_INFO (msg.c_str());
}
}