Mesh: Fix crash in node reset
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / oal-hid-host.c
index eb95e46..0458b41 100755 (executable)
@@ -50,14 +50,14 @@ static void handshake_callback(bt_bdaddr_t *bd_addr, bthh_status_t hh_status);
 static const bthh_interface_t * hid_api;
 
 static bthh_callbacks_t sBluetoothHidCallbacks = {
-       sizeof(sBluetoothHidCallbacks),
-       connection_state_callback,
-       hid_info_callback,
-       get_protocol_mode_callback,
-       idle_time_callback,
-       get_report_callback,
-       virtual_unplug_callback,
-       handshake_callback,
+       .size = sizeof(sBluetoothHidCallbacks),
+       .connection_state_cb = connection_state_callback,
+       .hid_info_cb = hid_info_callback,
+       .protocol_mode_cb = get_protocol_mode_callback,
+       .idle_time_cb = idle_time_callback,
+       .get_report_cb = get_report_callback,
+       .virtual_unplug_cb = virtual_unplug_callback,
+       .handshake_cb = handshake_callback,
 };
 
 oal_status_t hid_enable(void)
@@ -152,7 +152,7 @@ oal_status_t hid_set_report(bt_address_t *address,
        int ret;
        bdstr_t bdstr;
 
-       API_TRACE("len: %d", strlen(report));
+       API_TRACE("len: %zd", strlen(report));
        CHECK_OAL_HID_ENABLED();
        OAL_CHECK_PARAMETER(address, return);
        OAL_CHECK_PARAMETER(report, return);