changeset 26436:0dcb3e515370 stable

oct-rand.cc: Fix static analyzer detected issues (bug #55347). * oct-rand.cc (force_to_fit_range): Delete second (hi > lo) test in the same conditional.
author Rik <rik@octave.org>
date Fri, 04 Jan 2019 15:46:42 -0800
parents 590643c853bd
children b43eb366666c
files liboctave/numeric/oct-rand.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/numeric/oct-rand.cc	Fri Jan 04 15:23:59 2019 -0800
+++ b/liboctave/numeric/oct-rand.cc	Fri Jan 04 15:46:42 2019 -0800
@@ -99,7 +99,7 @@
   static int32_t
   force_to_fit_range (int32_t i, int32_t lo, int32_t hi)
   {
-    assert (hi > lo && lo >= 0 && hi > lo);
+    assert (hi > lo && lo >= 0);
 
     i = (i > 0 ? i : -i);