summaryrefslogtreecommitdiff
path: root/android/hal-health.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2014-06-16 10:57:38 +0300
committerSzymon Janc <szymon.janc@gmail.com>2014-06-18 00:05:40 +0200
commit09e69f80ef9d2bcd89746cc229a9a1fcdcc107bc (patch)
tree37da608bf9355d95a992c74038e26db4255d7a17 /android/hal-health.c
parenta02c369627b8aa60b805efee7703bec3c4809f6f (diff)
downloadbluez-09e69f80ef9d2bcd89746cc229a9a1fcdcc107bc.tar.gz
android/hal-health: Change scope of mdep
Make code cleaner lowering scope for mdep to the place it is actually used.
Diffstat (limited to 'android/hal-health.c')
-rw-r--r--android/hal-health.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/android/hal-health.c b/android/hal-health.c
index ab0665804..e440ef2f7 100644
--- a/android/hal-health.c
+++ b/android/hal-health.c
@@ -68,7 +68,6 @@ static bt_status_t register_application(bthl_reg_param_t *reg, int *app_id)
{
uint8_t buf[IPC_MTU];
struct hal_cmd_health_reg_app *cmd = (void *) buf;
- struct hal_cmd_health_mdep *mdep = (void *) buf;
struct hal_rsp_health_reg_app rsp;
size_t rsp_len = sizeof(rsp);
bt_status_t status;
@@ -123,6 +122,8 @@ static bt_status_t register_application(bthl_reg_param_t *reg, int *app_id)
return status;
for (i = 0; i < reg->number_of_mdeps; i++) {
+ struct hal_cmd_health_mdep *mdep = (void *) buf;
+
memset(buf, 0, IPC_MTU);
mdep->app_id = rsp.app_id;
mdep->role = reg->mdep_cfg[i].mdep_role;