]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
coverity fixes
authorshahoian <ruben.shahoyan@cern.ch>
Mon, 17 Feb 2014 13:21:59 +0000 (14:21 +0100)
committershahoian <ruben.shahoyan@cern.ch>
Mon, 17 Feb 2014 13:22:37 +0000 (14:22 +0100)
STEER/ESD/AliESDEvent.cxx
STEER/ESD/AliESDTOFCluster.cxx

index f2480f2253f874d9425295807372074463b9472b..e40820d778b87b76edfba82e8be2e38a1706952a 100644 (file)
@@ -2289,7 +2289,7 @@ void AliESDEvent::SetTOFcluster(Int_t ntofclusters,AliESDTOFCluster *cluster,Int
 
   if(mapping){
     AliInfo(Form("TOF cluster before of matching = %i , after = %i\n",ntofclusters,fESDTOFClusters->GetEntriesFast()));
-    Int_t hitnewpos[20000];
+    Int_t hitnewpos[20000]={0};
     Int_t nhitOriginal = fESDTOFHits->GetEntries();
     for(Int_t i=0;i < fESDTOFHits->GetEntries();i++){
       if(goodhit[i]){
@@ -2369,7 +2369,7 @@ void AliESDEvent::SetTOFcluster(Int_t ntofclusters,AliESDTOFCluster *cluster[],I
 
   if(mapping){
     AliInfo(Form("TOF cluster before of matching = %i , after = %i\n",ntofclusters,fESDTOFClusters->GetEntriesFast()));
-    Int_t hitnewpos[20000];
+    Int_t hitnewpos[20000]={0};
     Int_t nhitOriginal = fESDTOFHits->GetEntries();
     for(Int_t i=0;i < fESDTOFHits->GetEntries();i++){
       if(goodhit[i]){
index 27c6bb39fb139e15729377f4294588faa9ffcba3..389ea4ef1613b03b7328dc0c7a656b9c9439ba5d 100644 (file)
@@ -455,7 +455,7 @@ void AliESDTOFCluster::FixSelfReferences(int oldID, int newID)
   }
   for (int it=fNTOFhits;it--;) {
     AliESDTOFHit* hit = GetTOFHit(it);
-    hit->SetESDTOFClusterIndex(newID);
+    if (hit) hit->SetESDTOFClusterIndex(newID);
   }
   //
 }