summaryrefslogtreecommitdiff
path: root/extensions/source/scanner/sane.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-29 11:34:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-29 14:44:37 +0200
commit9b25614939f7709e3d67949f49c4beeec0cdc534 (patch)
treec1e25fc743202c1fd8288ef5f8c0332203b1fc5c /extensions/source/scanner/sane.cxx
parent6647a167400753df45dba788ed793d55ca0be9f8 (diff)
loplugin:simplifybool in dbaccess..framework
Change-Id: I0d73bb7d8d3fde426edc0a10c0750758b68aceb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions/source/scanner/sane.cxx')
-rw-r--r--extensions/source/scanner/sane.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index 9030e5697a09..f8f85de5d9e1 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -388,8 +388,8 @@ bool Sane::GetOptionValue( int n, double& rRet, int nElement )
bool Sane::GetOptionValue( int n, double* pSet )
{
- if( ! maHandle || ! ( mppOptions[n]->type == SANE_TYPE_FIXED ||
- mppOptions[n]->type == SANE_TYPE_INT ) )
+ if( ! maHandle || ( mppOptions[n]->type != SANE_TYPE_FIXED &&
+ mppOptions[n]->type != SANE_TYPE_INT ) )
return false;
std::unique_ptr<SANE_Word[]> pFixedSet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]);