diff libinterp/corefcn/__ilu__.cc @ 20956:850e3d2533d4

maint: Eliminate more useless statements after error(). * __ilu__.cc, display.cc, file-io.cc, graphics.cc, graphics.in.h, hex2num.cc, load-save.cc, ls-mat-ascii.cc, oct-errno.in.cc, pager.cc, sighandlers.cc, sub2ind.cc, symtab.h, syscalls.cc, toplev.h, txt-eng-ft.cc, __eigs__.cc, ov-bool-mat.cc, ov-classdef.h, ov-cx-mat.cc, ov-fcn-handle.cc, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-re-mat.cc, ov-str-mat.cc, ov-struct.cc, ov-typeinfo.cc, ov-usr-fcn.cc: maint: Eliminate more useless statements after error().
author Rik <rik@octave.org>
date Sun, 20 Dec 2015 13:26:17 -0800
parents a3359fe50966
children 81c2b14c209f
line wrap: on
line diff
--- a/libinterp/corefcn/__ilu__.cc	Sun Dec 20 10:15:02 2015 -0800
+++ b/libinterp/corefcn/__ilu__.cc	Sun Dec 20 13:26:17 2015 -0800
@@ -109,16 +109,10 @@
         for (jj = uptr[k] + 1; jj < cidx[k+1]; jj++)
           data[jj] /=  data[uptr[k]];
       if (k != jrow)
-        {
-          error ("ilu: A has a zero on the diagonal");
-          break;
-        }
+        error ("ilu: A has a zero on the diagonal");
 
       if (data[j] == T(0))
-        {
-          error ("ilu: encountered a pivot equal to 0");
-          break;
-        }
+        error ("ilu: encountered a pivot equal to 0");
       for (i = j1; i <= j2; i++)
         iw[ridx[i]] = -1;
     }
@@ -351,10 +345,7 @@
 
       // Check if the pivot is zero
       if (data_u[total_len_u] == zero)
-        {
-          error ("ilu: encountered a pivot equal to 0");
-          break;
-        }
+        error ("ilu: encountered a pivot equal to 0");
 
       // Scale the elements in L by the pivot
       for (i = total_len_l ; i < (total_len_l + w_len_l); i++)
@@ -366,10 +357,7 @@
       // Check if there are too many elements to be indexed with
       // octave_idx_type type due to fill-in during the process.
       if (total_len_l < 0 || total_len_u < 0)
-        {
-          error ("ilu: integer overflow.  Too many fill-in elements in L or U");
-          break;
-        }
+        error ("ilu: integer overflow.  Too many fill-in elements in L or U");
       cidx_u[k+1] = cidx_u[k] - cidx_u[0] + w_len_u;
       cidx_l[k+1] = cidx_l[k] - cidx_l[0] + w_len_l;
 
@@ -776,10 +764,7 @@
               iw_u.insert (k);
             }
           else
-            {
-              error ("ilu: encountered a pivot equal to 0");
-              break;
-            }
+            error ("ilu: encountered a pivot equal to 0");
         }
 
       // Scale the elements on the L part for IKJ version (milu = [col|off])
@@ -839,10 +824,7 @@
       // Check if there are too many elements to be indexed with
       // octave_idx_type type due to fill-in during the process.
       if (total_len_l < 0 || total_len_u < 0)
-        {
-          error ("ilu: Integer overflow.  Too many fill-in elements in L or U");
-          break;
-        }
+        error ("ilu: Integer overflow.  Too many fill-in elements in L or U");
       if (opt == ROW)
         uptr[k] = total_len_u - 1;
       cidx_u[k+1] = cidx_u[k] - cidx_u[0] + w_len_u;