Fix GCC 4.9 warnings
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_make_ndx.c
index 79bbd23602c8403c63b4e367a56fc50681e4239b..ea91754d5177e429210f3ecdd31c6e2639aea14c 100644 (file)
@@ -846,8 +846,12 @@ static int split_chain(t_atoms *atoms, rvec *x,
                 {
                     rvec_sub(x[ca_end], x[i], vec);
                 }
+                else
+                {
+                    break;
+                }
             }
-            while ((i < natoms) && (norm(vec) < 0.45));
+            while (norm(vec) < 0.45);
 
             end[nchain] = ca_end;
             while ((end[nchain]+1 < natoms) &&