basic/source/sbx/sbxdate.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 34d3f1601cf2dcb1c931d9454f2a06741f9e8b87
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Feb 28 12:01:05 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Feb 28 15:43:56 2022 +0100

    cid#707500 Uninitialized scalar variable
    
    Change-Id: I4680b59483ae827cbceb567968dc6c4e864f7ad4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130702
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index 6b695a9c40c7..057e16f09d03 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -84,14 +84,8 @@ double ImpGetDate( const SbxValues* p )
         break;
     case SbxDECIMAL:
     case SbxBYREF | SbxDECIMAL:
-        if( p->pDecimal )
-        {
-            p->pDecimal->getDouble( nRes );
-        }
-        else
-        {
+        if (!p->pDecimal || !p->pDecimal->getDouble(nRes))
             nRes = 0.0;
-        }
         break;
     case SbxBYREF | SbxSTRING:
     case SbxSTRING:

Reply via email to