]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCAlign.cxx
Fixes for coding violations
[u/mrichter/AliRoot.git] / TPC / AliTPCAlign.cxx
index 8432c896e979b085a8fa941a2b49ad1a903202ae..3db43a2325171761868df6a20e002f30d3ec5cc8 100644 (file)
@@ -82,10 +82,13 @@ AliTPCAlign::AliTPCAlign(Int_t reportloc, Int_t reportglob) :
   fFileLoc = new Char_t[80];
   fFileGlob = new Char_t[80];
   Char_t path[50];
-  sprintf(path,gSystem->Getenv("ALICE_ROOT")); 
+  //sprintf(path,gSystem->Getenv("ALICE_ROOT")); 
+  snprintf(path,50,gSystem->Getenv("ALICE_ROOT"));
   //
-  sprintf(fFileLoc,"%s/TPC/Survey_%d_TPC.txt",path,reportloc);
-  sprintf(fFileGlob,"%s/TPC/Survey_%d_TPC.txt",path,reportglob);
+  //sprintf(fFileLoc,"%s/TPC/Survey_%d_TPC.txt",path,reportloc);
+  snprintf(fFileLoc,80,"%s/TPC/Survey_%d_TPC.txt",path,reportloc);
+  //sprintf(fFileGlob,"%s/TPC/Survey_%d_TPC.txt",path,reportglob);
+  snprintf(fFileGlob,80,"%s/TPC/Survey_%d_TPC.txt",path,reportglob);
   //
 
 }
@@ -304,7 +307,8 @@ TClonesArray *array = new TClonesArray("AliAlignObjParams",1);
     // save on file
     const char* filename = "TPCSurveyMisalignment.root";
     Char_t fullname[80];
-    sprintf(fullname,"%s/TPC/%s",gSystem->Getenv("ALICE_ROOT"),filename);
+    //sprintf(fullname,"%s/TPC/%s",gSystem->Getenv("ALICE_ROOT"),filename);
+    snprintf(fullname,80,"%s/TPC/%s",gSystem->Getenv("ALICE_ROOT"),filename);
     TFile *f = new TFile(fullname,"RECREATE");
     if(!f){
       AliError("cannot open file for output\n");