OSDN Git Service

Initialize local variable in gatts_process_read_by_type_req
authorHansong Zhang <hsz@google.com>
Thu, 12 Apr 2018 18:45:03 +0000 (11:45 -0700)
committerHansong Zhang <hsz@google.com>
Fri, 13 Apr 2018 03:40:33 +0000 (20:40 -0700)
Bug: 73125709
Test: manual
Change-Id: Iac13d92c987e5bed4376ec994bb2a60cedf6c5db

stack/gatt/gatt_sr.cc

index e8438d0..e99c72b 100644 (file)
@@ -790,7 +790,7 @@ static void gatts_process_mtu_req(tGATT_TCB& tcb, uint16_t len,
 void gatts_process_read_by_type_req(tGATT_TCB& tcb, uint8_t op_code,
                                     uint16_t len, uint8_t* p_data) {
   Uuid uuid = Uuid::kEmpty;
-  uint16_t s_hdl, e_hdl, err_hdl = 0;
+  uint16_t s_hdl = 0, e_hdl = 0, err_hdl = 0;
   tGATT_STATUS reason =
       gatts_validate_packet_format(op_code, len, p_data, &uuid, s_hdl, e_hdl);