]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsegmentationSPD.cxx
Fixes for coverity warnings
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentationSPD.cxx
index 34ea73681134fc99350d1eeecac30d6eca479660..2c7cf759df9cda655a4a0a1900f4d11dc543c695 100644 (file)
@@ -95,10 +95,10 @@ Float_t AliITSsegmentationSPD::ColFromZ(Float_t z) const {
     } // end if outsize of detector
     s = 0.0;
     i = -1;
-    while(z>s){
-       i++;
-       s += fCellSizeZ[i];
-    } // end while
+    do {
+      i++;
+      s += fCellSizeZ[i];
+    } while(z>s);
     s -= fCellSizeZ[i];
     col = (Float_t) i + (z-s)/fCellSizeZ[i];
     return col;