mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: junky Review: https://reviewboard.asterisk.org/r/1743/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1492,7 +1492,7 @@ static odbc_status odbc_obj_disconnect(struct odbc_obj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
if ((res = SQLFreeHandle(SQL_HANDLE_DBC, con) == SQL_SUCCESS)) {
|
||||
if ((res = SQLFreeHandle(SQL_HANDLE_DBC, con)) == SQL_SUCCESS) {
|
||||
ast_debug(1, "Database handle %p deallocated\n", con);
|
||||
} else {
|
||||
SQLGetDiagRec(SQL_HANDLE_DBC, con, 1, state, &err, msg, 100, &mlen);
|
||||
@@ -1546,7 +1546,7 @@ static odbc_status odbc_obj_connect(struct odbc_obj *obj)
|
||||
SQLGetDiagRec(SQL_HANDLE_DBC, con, 1, state, &err, msg, 100, &mlen);
|
||||
obj->parent->last_negative_connect = ast_tvnow();
|
||||
ast_log(LOG_WARNING, "res_odbc: Error SQLConnect=%d errno=%d %s\n", res, (int)err, msg);
|
||||
if ((res = SQLFreeHandle(SQL_HANDLE_DBC, con) != SQL_SUCCESS)) {
|
||||
if ((res = SQLFreeHandle(SQL_HANDLE_DBC, con)) != SQL_SUCCESS) {
|
||||
SQLGetDiagRec(SQL_HANDLE_DBC, con, 1, state, &err, msg, 100, &mlen);
|
||||
ast_log(LOG_WARNING, "Unable to deallocate database handle %p? %d errno=%d %s\n", con, res, (int)err, msg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user