hwpfilter/source/solver.cxx |    8 --------
 1 file changed, 8 deletions(-)

New commits:
commit 9c4a485194c158d970df7bf06d5a6d6791b76f42
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Oct 18 00:45:38 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Oct 18 08:50:31 2024 +0200

    tdf#163486: PVS: redundant nullptr check
    
    V668    There is no sense in testing the 'indxc' pointer against null, as 
the memory was allocated using the 'new' operator. The exception will be 
generated in the case of memory allocation error.
    V668    There is no sense in testing the 'indxr' pointer against null, as 
the memory was allocated using the 'new' operator. The exception will be 
generated in the case of memory allocation error.
    V668    There is no sense in testing the 'ipiv' pointer against null, as 
the memory was allocated using the 'new' operator. The exception will be 
generated in the case of memory allocation error.
    
    Change-Id: Ifecd9ef5b831e5b312bb428e4d4f72c03cc29b7b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175106
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/hwpfilter/source/solver.cxx b/hwpfilter/source/solver.cxx
index 7e2788f7f626..cbb9e4e72449 100644
--- a/hwpfilter/source/solver.cxx
+++ b/hwpfilter/source/solver.cxx
@@ -47,16 +47,8 @@ std::unique_ptr<double[]> mgcLinearSystemD::NewVector (int N)
 bool mgcLinearSystemD::Solve (int n, 
std::unique_ptr<std::unique_ptr<double[]>[]> const & a, double* b)
 {
   std::unique_ptr<int[]> indxc( new int[n] );
-  if ( !indxc )
-    return false;
   std::unique_ptr<int[]> indxr( new int[n] );
-  if ( !indxr ) {
-    return false;
-  }
   std::unique_ptr<int[]> ipiv( new int[n] );
-  if ( !ipiv ) {
-    return false;
-  }
 
   int i, j, k;
   int irow = 0;

Reply via email to