From: ivana Date: Wed, 29 Sep 2010 09:52:33 +0000 (+0000) Subject: One more attempt to fix NEGATIVE_RETURNS defect reported by Coverity X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=5d48f035544c366cfc2eb8263519808d78b4fcb5;p=u%2Fmrichter%2FAliRoot.git One more attempt to fix NEGATIVE_RETURNS defect reported by Coverity --- diff --git a/MUON/AliMUONPreClusterFinderV3.cxx b/MUON/AliMUONPreClusterFinderV3.cxx index efbe483eedc..d1585151521 100644 --- a/MUON/AliMUONPreClusterFinderV3.cxx +++ b/MUON/AliMUONPreClusterFinderV3.cxx @@ -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); diff --git a/MUON/AliMUONVGeometryBuilder.cxx b/MUON/AliMUONVGeometryBuilder.cxx index 1ae1432e36a..74f3538b363 100644 --- a/MUON/AliMUONVGeometryBuilder.cxx +++ b/MUON/AliMUONVGeometryBuilder.cxx @@ -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() )