[Libreoffice-commits] core.git: connectivity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Oct 21 18:13:55 UTC 2018
connectivity/source/drivers/odbc/OResultSet.cxx | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 562765f8cc3b9dc625a0d7b9304f98c2c01e63c1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 20 19:42:05 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 21 20:13:32 2018 +0200
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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
More information about the Libreoffice-commits
mailing list