changeset 26352:8020c9ba82fc stable

__delaunayn__.cc: Fix static analyzer detected issues (bug #55347). * __delaunayn__.cc (F__delaunayn__): Remove useless check "if (! exitcode)" and un-indent code block.
author Rik <rik@octave.org>
date Tue, 01 Jan 2019 20:58:32 -0800
parents f6473e416fa2
children d43ba2c21d1d
files libinterp/dldfcn/__delaunayn__.cc
diffstat 1 files changed, 11 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/dldfcn/__delaunayn__.cc	Tue Jan 01 20:47:53 2019 -0800
+++ b/libinterp/dldfcn/__delaunayn__.cc	Tue Jan 01 20:58:32 2019 -0800
@@ -204,26 +204,23 @@
             error ("__delaunayn__: Qhull returned non-simplicial facets -- try delaunayn with different options");
         }
 
-      if (! exitcode)
-        {
-          Matrix simpl (nf, dim+1);
+      Matrix simpl (nf, dim+1);
 
-          FORALLfacets
+      FORALLfacets
+        {
+          if (! facet->upperdelaunay)
             {
-              if (! facet->upperdelaunay)
-                {
-                  octave_idx_type j = 0;
+              octave_idx_type j = 0;
 
-                  FOREACHvertex_ (facet->vertices)
-                    {
-                      simpl(i, j++) = 1 + qh_pointid(vertex->point);
-                    }
-                  i++;
+              FOREACHvertex_ (facet->vertices)
+                {
+                  simpl(i, j++) = 1 + qh_pointid(vertex->point);
                 }
+              i++;
             }
+        }
 
-          retval(0) = simpl;
-        }
+      retval(0) = simpl;
     }
   else if (n == dim + 1)
     {