]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Reverting change in r 29876 which caused seg faults under certain circumstances,...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 May 2009 11:06:55 +0000 (11:06 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 May 2009 11:06:55 +0000 (11:06 +0000)
Matthias

STEER/AliSimulation.cxx

index ef34eefd1ed70c03b9993b5bd38b60cac9a8029e..d1fc25c0fb3ca56c57e5ba68dfe45bec7fa0f4a9 100644 (file)
@@ -1962,17 +1962,15 @@ Bool_t AliSimulation::RunHLT()
   }
 
   // print compile info
-  typedef void (*CompileInfo)( char*& date, char*& time);
+  typedef void (*CompileInfo)( const char*& date, const char*& time);
   CompileInfo fctInfo=(CompileInfo)gSystem->DynFindSymbol(ALIHLTSIMULATION_LIBRARY, "CompileInfo");
   if (fctInfo) {
-    Char_t* date=0;
-    Char_t* time=0;
-    (*fctInfo)(date,time);
-    if (!date) {date=new Char_t[8]; strcpy(date,"unknown");}
-    if (!time) {time=new Char_t[8]; strcpy(time,"unknown");}
+    const char* date="";
+    const char* time="";
+    (*fctInfo)(date, time);
+    if (!date) date="unknown";
+    if (!time) time="unknown";
     AliInfo(Form("%s build on %s (%s)", ALIHLTSIMULATION_LIBRARY, date, time));
-    delete date;
-    delete time;
   } else {
     AliInfo(Form("no build info available for %s", ALIHLTSIMULATION_LIBRARY));
   }