]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFDigitizer.cxx
Fix coding rule violations
[u/mrichter/AliRoot.git] / TOF / AliTOFDigitizer.cxx
index 419ab6c92ade8ea07e8c276f6dee64d4f4444578..480e904e307ede818b44e9496c47231b2039fee7 100644 (file)
@@ -150,8 +150,10 @@ void AliTOFDigitizer::Exec(Option_t* /*option*/)
   AliTOF * tof = (AliTOF *) gAlice->GetDetector("TOF") ;
 
   //Make branches
-  char branchname[20];
-  sprintf (branchname, "%s", tof->GetName ());
+
+  const Int_t kSize = 20;
+  char branchname[kSize];
+  snprintf(branchname,kSize,"%s", tof->GetName ());
  
   AliRunLoader* outrl = AliRunLoader::GetRunLoader(fManager->GetOutputFolderName());
   if (outrl == 0x0)
@@ -344,6 +346,7 @@ void AliTOFDigitizer::ReadSDigit(Int_t inputFile )
 
   if(!tofBranch){
     AliFatal(Form("TOF branch not found for input %d",inputFile));
+    return;
   }
   
   tofBranch->SetAddress(&sdigitsDummyContainer);