Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4fe8291 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Use existing, pre-defined empty name

Grabbing a pointer to "" looks suspicious. Quick search didn't make it
any clearer - some forums suggest it would be a pointer to stack, others
it would point to heap, depending on compiler optimizations.
To make things clean and easy, use existing empty name holder.

Bug: None
Flag: exempt, trivial fix.
Test: compilation
Change-Id: I63036c11962372c2c11f4a16867f90dc25dbf60f
parent b5ebf2c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2216,7 +2216,7 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
    }
  }

  if (!p_bd_name) p_bd_name = (const uint8_t*)"";
  if (!p_bd_name) p_bd_name = (const uint8_t*)kBtmBdNameEmpty;

  if (p_dev_rec == nullptr) {
    log::debug(