Skip to content

Commit

Permalink
Correct wrong string method calls
Browse files Browse the repository at this point in the history
These two calls have no effect because `std::string::empty()` only tests
for emptiness, but does not cause it as apparently intended.
  • Loading branch information
chrullrich committed Oct 23, 2024
1 parent c362d98 commit e6b4055
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgxalib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ HDBC XAConnection::ActivateConnection(void)
SQLFreeHandle(SQL_HANDLE_DBC, xaconn);
return NULL;
}
sqlState.empty();
errMsg.empty();
sqlState.clear();
errMsg.clear();
ret = SQLDriverConnect(xaconn, NULL,
(SQLCHAR *) (dsnstr + ";Username=postgres;Password=postgres;sslmode=allow").c_str(), SQL_NTS, NULL, SQL_NULL_DATA, NULL, SQL_DRIVER_COMPLETE);
if (SQL_SUCCEEDED(ret))
Expand Down

0 comments on commit e6b4055

Please sign in to comment.