mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
move variable declarations to the beginning of a block.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3144,15 +3144,15 @@ static int handle_button_template_req_message(skinny_req *req, struct skinnysess
|
|||||||
struct skinny_line *l;
|
struct skinny_line *l;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!(req = req_alloc(sizeof(button_template_res_message), BUTTON_TEMPLATE_RES_MESSAGE)))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
struct skinny_speeddial *sd;
|
struct skinny_speeddial *sd;
|
||||||
button_definition_template btn[42];
|
button_definition_template btn[42];
|
||||||
int lineInstance = 1;
|
int lineInstance = 1;
|
||||||
int speeddialInstance = 1;
|
int speeddialInstance = 1;
|
||||||
int buttonCount = 0;
|
int buttonCount = 0;
|
||||||
|
|
||||||
|
if (!(req = req_alloc(sizeof(button_template_res_message), BUTTON_TEMPLATE_RES_MESSAGE)))
|
||||||
|
return -1;
|
||||||
|
|
||||||
memset(&btn, 0, sizeof(btn));
|
memset(&btn, 0, sizeof(btn));
|
||||||
|
|
||||||
get_button_template(s, 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 i;
|
||||||
int x;
|
int x;
|
||||||
int y;
|
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)))
|
if (!(req = req_alloc(sizeof(soft_key_set_res_message), SOFT_KEY_SET_RES_MESSAGE)))
|
||||||
return -1;
|
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.softKeySetOffset = htolel(0);
|
||||||
req->data.softkeysets.softKeySetCount = htolel(11);
|
req->data.softkeysets.softKeySetCount = htolel(11);
|
||||||
req->data.softkeysets.totalSoftKeySetCount = 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++) {
|
for (x = 0; x < sizeof(soft_key_default_definitions) / sizeof(soft_key_definitions); x++) {
|
||||||
const uint8_t *defaults = softkeymode->defaults;
|
const uint8_t *defaults = softkeymode->defaults;
|
||||||
/* XXX I wanted to get the size of the array dynamically, but that wasn't wanting to work.
|
/* XXX I wanted to get the size of the array dynamically, but that wasn't wanting to work.
|
||||||
|
Reference in New Issue
Block a user