Since this code appears everywhere, it makes more sense to isolate it in a function visible to all gbak components. Given a request, if it's non-zero (compiled), deallocate it but without caring about a possible error.
| 37 | // Given a request, if it's non-zero (compiled), deallocate it but |
| 38 | // without caring about a possible error. |
| 39 | void MISC_release_request_silent(Firebird::IRequest*& req_handle) |
| 40 | { |
| 41 | if (req_handle) |
| 42 | { |
| 43 | req_handle->release(); |
| 44 | req_handle = nullptr; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | |
| 49 | int MISC_symbol_length( const TEXT* symbol, ULONG size_len) |