From b5ef5c4771adadbe02e96fa09582ef2306c78b7e Mon Sep 17 00:00:00 2001 From: robocop Date: Sat, 2 Apr 2011 04:53:35 +0000 Subject: [PATCH] Misc, style, etc. --- src/remote/client/interface.cpp | 13 ++++++++----- src/remote/os/win32/wnet.cpp | 2 +- src/remote/os/win32/xnet.cpp | 5 ++--- src/remote/remot_proto.h | 1 + src/remote/server/os/win32/srvr_w32.cpp | 9 ++++++--- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/remote/client/interface.cpp b/src/remote/client/interface.cpp index 50ad3a8aa8..39d76b8c74 100644 --- a/src/remote/client/interface.cpp +++ b/src/remote/client/interface.cpp @@ -1513,7 +1513,8 @@ Firebird::ITransaction* Statement::execute(Status* status, Firebird::ITransactio RefMutexGuard portGuard(*port->port_sync); Rtr* transaction = 0; - if (apiTra) { + if (apiTra) + { transaction = ((Transaction*)apiTra)->getTransaction(); CHECK_HANDLE(transaction, isc_bad_trans_handle); } @@ -1703,7 +1704,8 @@ Firebird::ITransaction* Attachment::execute(Status* status, Firebird::ITransacti unsigned char* out_msg = outMsgBuffer ? outMsgBuffer->buffer : NULL; Rtr* transaction = 0; - if (apiTra) { + if (apiTra) + { transaction = ((Transaction*)apiTra)->getTransaction(); CHECK_HANDLE(transaction, isc_bad_trans_handle); } @@ -2347,7 +2349,8 @@ Statement* Statement::prepare(Status* status, Firebird::ITransaction* apiTra, RefMutexGuard portGuard(*port->port_sync); Rtr* transaction = 0; - if (apiTra) { + if (apiTra) + { transaction = reinterpret_cast(apiTra)->getTransaction(); CHECK_HANDLE(transaction, isc_bad_trans_handle); } @@ -3620,7 +3623,7 @@ void Transaction::rollbackRetaining(Status* status) * Abort a transaction but keep its environment valid * **************************************/ - reset(status); + reset(status); CHECK_HANDLE(transaction, isc_bad_trans_handle); @@ -4390,7 +4393,7 @@ void Attachment::ping(Status* status) { /************************************** * - * f b _ p i n g + * p i n g * ************************************** * diff --git a/src/remote/os/win32/wnet.cpp b/src/remote/os/win32/wnet.cpp index 103395376c..64b1ecae5c 100644 --- a/src/remote/os/win32/wnet.cpp +++ b/src/remote/os/win32/wnet.cpp @@ -462,7 +462,7 @@ rem_port* WNET_reconnect(HANDLE handle) * * Functional description * A communications link has been established by another - * process. We have inheritted the handle. Set up + * process. We have inherited the handle. Set up * a port block. * **************************************/ diff --git a/src/remote/os/win32/xnet.cpp b/src/remote/os/win32/xnet.cpp index 7797d35297..b8370e691f 100644 --- a/src/remote/os/win32/xnet.cpp +++ b/src/remote/os/win32/xnet.cpp @@ -143,7 +143,7 @@ namespace class ExitHandler { public: - ExitHandler(MemoryPool&) {}; + explicit ExitHandler(MemoryPool&) {}; ~ExitHandler() { @@ -1406,8 +1406,7 @@ static rem_port* connect_server(USHORT flag) presponse->slot_num = slot_num; presponse->timestamp = timestamp; - rem_port* port = get_server_port(client_pid, xpm, map_num, slot_num, - timestamp); + rem_port* port = get_server_port(client_pid, xpm, map_num, slot_num, timestamp); SetEvent(xnet_response_event); diff --git a/src/remote/remot_proto.h b/src/remote/remot_proto.h index aba164c70b..bdff488f71 100644 --- a/src/remote/remot_proto.h +++ b/src/remote/remot_proto.h @@ -46,5 +46,6 @@ void REMOTE_reset_request (struct Rrq *, struct RMessage*); void REMOTE_reset_statement (struct Rsr *); void REMOTE_save_status_strings (ISC_STATUS *); bool_t REMOTE_getbytes (XDR*, SCHAR*, u_int); + #endif // REMOTE_REMOT_PROTO_H diff --git a/src/remote/server/os/win32/srvr_w32.cpp b/src/remote/server/os/win32/srvr_w32.cpp index db5cdb7080..75ee347c1e 100644 --- a/src/remote/server/os/win32/srvr_w32.cpp +++ b/src/remote/server/os/win32/srvr_w32.cpp @@ -540,7 +540,8 @@ static THREAD_ENTRY_DECLARE start_connections_thread(THREAD_ENTRY_PARAM) **************************************/ ThreadCounter counter; - if (server_flag & SRVR_inet) { + if (server_flag & SRVR_inet) + { try { Thread::start(inet_connect_wait_thread, 0, THREAD_medium); } @@ -548,7 +549,8 @@ static THREAD_ENTRY_DECLARE start_connections_thread(THREAD_ENTRY_PARAM) iscLogException("INET: can't start listener thread", ex); } } - if (server_flag & SRVR_wnet) { + if (server_flag & SRVR_wnet) + { try { Thread::start(wnet_connect_wait_thread, 0, THREAD_medium); } @@ -556,7 +558,8 @@ static THREAD_ENTRY_DECLARE start_connections_thread(THREAD_ENTRY_PARAM) iscLogException("WNET: can't start listener thread", ex); } } - if (server_flag & SRVR_xnet) { + if (server_flag & SRVR_xnet) + { try { Thread::start(xnet_connect_wait_thread, 0, THREAD_medium); }