MXS-1506: Clean up various functions

Reduced variable scopes and removed unused code.
This commit is contained in:
Markus Mäkelä
2018-04-06 10:36:53 +03:00
parent 23bc8b6db6
commit c8d25f293f
5 changed files with 14 additions and 45 deletions

View File

@ -312,7 +312,7 @@ bool RWSplit::select_connect_backend_servers(MXS_SESSION *session,
/** Check slave selection criteria and set compare function */
select_criteria_t select_criteria = config().slave_selection_criteria;
int (*cmpfun)(const SRWBackend&, const SRWBackend&) = criteria_cmpfun[select_criteria];
auto cmpfun = criteria_cmpfun[select_criteria];
ss_dassert(cmpfun);
if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO))