changeset 26460:73ce195bf66e stable

ls-oct-text.cc: Fix static analyzer detected issues (bug #55347). * ls-oct-text.cc (save_three_d): Eliminate useless bool variable "fail".
author Rik <rik@octave.org>
date Sat, 05 Jan 2019 11:14:05 -0800
parents 1479694709ea
children ac6f0b8e94c0
files libinterp/corefcn/ls-oct-text.cc
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/ls-oct-text.cc	Sat Jan 05 11:10:09 2019 -0800
+++ b/libinterp/corefcn/ls-oct-text.cc	Sat Jan 05 11:14:05 2019 -0800
@@ -353,8 +353,6 @@
 bool
 save_three_d (std::ostream& os, const octave_value& tc, bool parametric)
 {
-  bool fail = false;
-
   octave_idx_type nr = tc.rows ();
   octave_idx_type nc = tc.columns ();
 
@@ -400,7 +398,7 @@
 
   os.precision (old_precision);
 
-  return (os && ! fail);
+  return (os);
 }
 
 DEFUN (save_precision, args, nargout,