]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing coverity 17917
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Jan 2012 14:04:17 +0000 (14:04 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Jan 2012 14:04:17 +0000 (14:04 +0000)
STEER/CDB/AliSplineFit.cxx

index 9ee597b784ea7bf34aadd459ecaea615d945bf38..d03585fc53f0f1336c5b17cc57e8c2b2aea48979 100644 (file)
@@ -265,9 +265,13 @@ TGraph * AliSplineFit::MakeGraph(Double_t xmin, Double_t xmax, Int_t npoints, In
 
   TGraph *graph =0;
   if (npoints<=0) {
-    if (deriv<=0) return new TGraph(fN,fX,fY0);
-    if (deriv==1) return new TGraph(fN,fX,fY1);
-    if (deriv>2) return new TGraph(fN-1,fX,fChi2I);
+    if (deriv<=0) 
+      return new TGraph(fN,fX,fY0);
+    else 
+      if (deriv==1) 
+       return new TGraph(fN,fX,fY1);
+      else 
+       return new TGraph(fN-1,fX,fChi2I);
   }
   Double_t * x = new Double_t[npoints+1];
   Double_t * y = new Double_t[npoints+1];