connectivity/source/drivers/odbc/OResultSet.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
New commits: commit 562765f8cc3b9dc625a0d7b9304f98c2c01e63c1 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Oct 20 19:42:05 2018 +0100 Commit: Caolán McNamara <[email protected]> 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 <[email protected]> Tested-by: Caolán McNamara <[email protected]> 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 _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
