summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-20 19:42:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-21 20:13:32 +0200
commit562765f8cc3b9dc625a0d7b9304f98c2c01e63c1 (patch)
tree875cc66d0b10b112275b42d290f283796583f8a3 /connectivity
parent0785b156e52705f8b8c6cd0ff5c71f45af9de4fe (diff)
pvs-studio: Expression '_par0 > 0' is always true.
Change-Id: I61e49c665d84e34748ae9e5974edb7ee2785e044 Reviewed-on: https://gerrit.libreoffice.org/62100 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index ec48bf8db798..0f77f92c3a00 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -1382,12 +1382,9 @@ void OResultSet::setFetchSize(sal_Int32 _par0)
{
throw css::beans::PropertyVetoException("SDBC/ODBC layer not prepared for fetchSize > 1", *this);
}
- if ( _par0 > 0 )
- {
- setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_ROW_ARRAY_SIZE, _par0);
- m_pRowStatusArray.reset( new SQLUSMALLINT[_par0] );
- setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR, m_pRowStatusArray.get());
- }
+ setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_ROW_ARRAY_SIZE, _par0);
+ m_pRowStatusArray.reset( new SQLUSMALLINT[_par0] );
+ setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR, m_pRowStatusArray.get());
}
IPropertyArrayHelper* OResultSet::createArrayHelper( ) const