]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
One more attempt to fix NEGATIVE_RETURNS defect reported by Coverity
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Sep 2010 09:52:33 +0000 (09:52 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Sep 2010 09:52:33 +0000 (09:52 +0000)
MUON/AliMUONPreClusterFinderV3.cxx
MUON/AliMUONVGeometryBuilder.cxx

index efbe483eedc9bc3a23db682a6ad7caa3df3722b9..d1585151521874e1ef09174d52b3f775b0c5f950 100644 (file)
@@ -194,6 +194,7 @@ AliMUONPreClusterFinderV3::AddPreCluster(AliMUONCluster& cluster, AliMUONCluster
   if ( cathode < 0 ) {
     AliError(Form("Cathod undefined: %d",cathode));
     AliFatal("");
+    return;
   }
   
   if ( cathode <=1 && !fPreClusters[cathode]->Remove(preCluster) ) 
@@ -202,6 +203,7 @@ AliMUONPreClusterFinderV3::AddPreCluster(AliMUONCluster& cluster, AliMUONCluster
                   preCluster->AsString().Data(),cathode));
     StdoutToAliDebug(1,DumpPreClusters());
     AliFatal("");
+    return;
   }
              
   cluster.AddCluster(a);
index 1ae1432e36a09588617c6ff4c5c9335499d7b191..74f3538b363799a18459e60d0b611dacd2b79592 100644 (file)
@@ -457,7 +457,7 @@ void  AliMUONVGeometryBuilder::RebuildSVMaps(Bool_t withEnvelopes) const
         std::string ePath = ComposePath(eName, envelope->GetCopyNo()).Data();
          std::string::size_type ePathPos = path0.find(ePath);
          if ( ePathPos != std::string::npos )
-           path0.erase(path0.find(ePath), ePath.size());
+           path0.erase(ePathPos, ePath.size());
       }
 
       if ( ! envelope->IsVirtual() )