move variable declarations to the beginning of a block.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37907 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
f15293c34d
commit
3f1dfedf60
|
@ -3144,15 +3144,15 @@ static int handle_button_template_req_message(skinny_req *req, struct skinnysess
|
|||
struct skinny_line *l;
|
||||
int i;
|
||||
|
||||
if (!(req = req_alloc(sizeof(button_template_res_message), BUTTON_TEMPLATE_RES_MESSAGE)))
|
||||
return -1;
|
||||
|
||||
struct skinny_speeddial *sd;
|
||||
button_definition_template btn[42];
|
||||
int lineInstance = 1;
|
||||
int speeddialInstance = 1;
|
||||
int buttonCount = 0;
|
||||
|
||||
if (!(req = req_alloc(sizeof(button_template_res_message), BUTTON_TEMPLATE_RES_MESSAGE)))
|
||||
return -1;
|
||||
|
||||
memset(&btn, 0, sizeof(btn));
|
||||
|
||||
get_button_template(s, btn);
|
||||
|
@ -3351,6 +3351,7 @@ static int handle_soft_key_set_req_message(skinny_req *req, struct skinnysession
|
|||
int i;
|
||||
int x;
|
||||
int y;
|
||||
const soft_key_definitions *softkeymode = soft_key_default_definitions;
|
||||
|
||||
if (!(req = req_alloc(sizeof(soft_key_set_res_message), SOFT_KEY_SET_RES_MESSAGE)))
|
||||
return -1;
|
||||
|
@ -3358,7 +3359,6 @@ static int handle_soft_key_set_req_message(skinny_req *req, struct skinnysession
|
|||
req->data.softkeysets.softKeySetOffset = htolel(0);
|
||||
req->data.softkeysets.softKeySetCount = htolel(11);
|
||||
req->data.softkeysets.totalSoftKeySetCount = htolel(11);
|
||||
const soft_key_definitions *softkeymode = soft_key_default_definitions;
|
||||
for (x = 0; x < sizeof(soft_key_default_definitions) / sizeof(soft_key_definitions); x++) {
|
||||
const uint8_t *defaults = softkeymode->defaults;
|
||||
/* XXX I wanted to get the size of the array dynamically, but that wasn't wanting to work.
|
||||
|
|
Reference in New Issue