Clean up bits and pieces, removed some unnecessary checks.

This commit is contained in:
VilhoRaatikka
2015-01-14 14:11:19 +02:00
parent df2297aa6c
commit b3824a1eaf
4 changed files with 31 additions and 27 deletions

View File

@ -1222,7 +1222,7 @@ dcb_close(DCB *dcb)
* dcb_close may be called for freshly created dcb, in which case
* it only needs to be freed.
*/
if (dcb->state == DCB_STATE_ALLOC)
if (dcb->state == DCB_STATE_ALLOC)
{
dcb_set_state(dcb, DCB_STATE_DISCONNECTED, NULL);
dcb_final_free(dcb);

View File

@ -1118,7 +1118,7 @@ gw_backend_hangup(DCB *dcb)
gwbuf_free(errbuf);
/** There are no required backends available, close session. */
if (!succp)
if (!succp)
{
#if defined(SS_DEBUG)
LOGIF(LE, (skygw_log_write_flush(

View File

@ -836,7 +836,7 @@ static void* newSession(
free(backend_ref);
client_rses = NULL;
goto return_rses;
}
}
/**
* Initialize backend references with BACKEND ptr.
* Initialize session command cursors for each backend reference.
@ -2706,7 +2706,7 @@ static void clientReply (
goto lock_failed;
}
/** There is one pending session command to be executed. */
if (sescmd_cursor_is_active(scur))
if (sescmd_cursor_is_active(scur))
{
bool succp;
@ -2962,7 +2962,7 @@ static bool select_connect_backend_servers(
{
succp = false;
goto return_succp;
}
}
if (router->bitvalue != 0) /*< 'synced' is the only bitvalue in rwsplit */
{
@ -3611,7 +3611,7 @@ static GWBUF* sescmd_cursor_process_replies(
bref_clear_state(bref, BREF_WAITING_RESULT);
}
/** Response is in the buffer and it will be sent to client. */
else if (replybuf != NULL)
else
{
/** Mark the rest session commands as replied */
scmd->my_sescmd_is_replied = true;
@ -4544,7 +4544,7 @@ static bool handle_error_new_connection(
succp = true;
goto return_succp;
}
/**
/**
* Remove callback because this DCB won't be used
* unless it is reconnected later, and then the callback
* is set again.