Skip to content

Commit

Permalink
Fixing uninitialized variable coverity issue
Browse files Browse the repository at this point in the history
has_died_ is not initialized in the constructor nor
in any functions that it calls

Initialized has_died_ in constructor

Tested:
BT on/off --> 10 times
Connect phone, play music -> 10 times
HFP call --> 10 times
File transfer -> working
CtsBluetoothTestCases -> passing

Tracked-On: OAM-123193
Signed-off-by: devath1x <[email protected]>
Signed-off-by: Gowtham Anandha Babu <[email protected]>
  • Loading branch information
devath1x authored and sysopenci committed Sep 19, 2024
1 parent 48c4546 commit bc9c17b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bluetooth/bluetooth_hci.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static const uint8_t HCI_DATA_TYPE_SCO = 3;

class BluetoothDeathRecipient : public hidl_death_recipient {
public:
BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {}
BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci), has_died_(false) {}

virtual void serviceDied(
uint64_t /*cookie*/,
Expand Down

0 comments on commit bc9c17b

Please sign in to comment.