summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2006-07-18 21:19:59 +0000
committerLuigi Rizzo <rizzo@icir.org>2006-07-18 21:19:59 +0000
commit31d0db0e29f4572fe5a9fc34005948736d52bb2f (patch)
tree2854905b5e94b8c02d5ab4c56ca8f08772f49ff7 /channels
parent566ce7ef2667ecd8f4871ee222d9d7cfefbfd3a8 (diff)
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
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_skinny.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 808dfb154..c74c090a9 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -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.