summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-28 12:01:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-02-28 15:43:56 +0100
commit34d3f1601cf2dcb1c931d9454f2a06741f9e8b87 (patch)
tree69c7e27bc98c104fd44b6fe38420be8e8af0274b /basic
parentd83323462452fb793b849758a0d975f3bd353ac9 (diff)
cid#707500 Uninitialized scalar variable
Change-Id: I4680b59483ae827cbceb567968dc6c4e864f7ad4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130702 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxdate.cxx8
1 files changed, 1 insertions, 7 deletions
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: