diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-03-30 11:43:22 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-03-30 11:43:22 +0000 |
commit | 332e099b19bd04db46cfffdf7d06b8a888169d49 (patch) | |
tree | 2dd2e401ce3f228d311cb3d0867465c28bb29045 /libodbcpp/odbc-connection.cpp | |
parent | Bring inline with clang-tidy checks (diff) | |
download | libdbpp-odbc-332e099b19bd04db46cfffdf7d06b8a888169d49.tar.bz2 libdbpp-odbc-332e099b19bd04db46cfffdf7d06b8a888169d49.tar.xz libdbpp-odbc-332e099b19bd04db46cfffdf7d06b8a888169d49.zip |
Tidy fixes for latest clanglibdbpp-odbc-1.4.1
Diffstat (limited to 'libodbcpp/odbc-connection.cpp')
-rw-r--r-- | libodbcpp/odbc-connection.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libodbcpp/odbc-connection.cpp b/libodbcpp/odbc-connection.cpp index 4e4a0a1..8ecaf2c 100644 --- a/libodbcpp/odbc-connection.cpp +++ b/libodbcpp/odbc-connection.cpp @@ -55,14 +55,14 @@ ODBC::Connection::connectPost() if (!SQL_SUCCEEDED(dberr)) { throw ConnectionError(dberr, SQL_HANDLE_DBC, conn); } - char info[1024]; - dberr = SQLGetInfo(conn, SQL_DRIVER_NAME, (SQLCHAR*)info, sizeof(info), nullptr); + std::array<SQLCHAR, 1024> info {}; + dberr = SQLGetInfo(conn, SQL_DRIVER_NAME, info.data(), info.size(), nullptr); if (!SQL_SUCCEEDED(dberr)) { throw ConnectionError(dberr, SQL_HANDLE_DBC, conn); } // Apply known DB specific tweaks // NOLINTNEXTLINE(hicpp-no-array-decay) - if (strstr(info, "myodbc")) { + if (strcasestr((const char *)info.data(), "myodbc")) { thinkDelStyle = DB::BulkDeleteUsingUsingAlias; thinkUpdStyle = DB::BulkUpdateUsingJoin; } |