summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-10 20:47:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-11 11:20:43 +0200
commit2d582244680e7f6dec6e4a466e276f93ccb01dc9 (patch)
treeb0e880ddfb3ce1ea2f47151b648e7fbb55132f08 /connectivity
parent74012c48d99634a7556a86f77e9522024f2afdb2 (diff)
loplugin:flatten
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index 26a549814cf3..53a8f8fb1905 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -60,21 +60,21 @@ OConnection::~OConnection()
if(!isClosed( ))
close();
- if ( SQL_NULL_HANDLE != m_aConnectionHandle )
- {
- SQLRETURN rc;
-
- if (!m_bClosed)
- {
- rc = N3SQLDisconnect( m_aConnectionHandle );
- OSL_ENSURE( rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO, "Failure from SQLDisconnect" );
- }
+ if ( SQL_NULL_HANDLE == m_aConnectionHandle )
+ return;
- rc = N3SQLFreeHandle( SQL_HANDLE_DBC, m_aConnectionHandle );
- OSL_ENSURE( rc == SQL_SUCCESS , "Failure from SQLFreeHandle for connection");
+ SQLRETURN rc;
- m_aConnectionHandle = SQL_NULL_HANDLE;
+ if (!m_bClosed)
+ {
+ rc = N3SQLDisconnect( m_aConnectionHandle );
+ OSL_ENSURE( rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO, "Failure from SQLDisconnect" );
}
+
+ rc = N3SQLFreeHandle( SQL_HANDLE_DBC, m_aConnectionHandle );
+ OSL_ENSURE( rc == SQL_SUCCESS , "Failure from SQLFreeHandle for connection");
+
+ m_aConnectionHandle = SQL_NULL_HANDLE;
}
oslGenericFunction OConnection::getOdbcFunction(ODBC3SQLFunctionId _nIndex) const