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

Commit cd2b900a authored by Chris Wailes's avatar Chris Wailes
Browse files

Silence error by assigning \0 instead of NULL

error: cast from pointer to smaller type 'uint8_t' (aka 'unsigned char') loses information

Test: lunch aosp_cf_arm64_phone-trunk_staging-userdebug
Test: m libbluetooth_core_rs_bridge
Bug: 303116432
Change-Id: I230b88d4ee6be11a1014318bb323a3259d450408
parent 1a7bcca7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ typedef uint8_t BD_NAME[BD_NAME_LEN + 1]; /* Device name */

inline constexpr BD_NAME kBtmBdNameEmpty = {};
constexpr size_t kBdNameLength = static_cast<size_t>(BD_NAME_LEN);
constexpr uint8_t kBdNameDelim = (uint8_t)NULL;
constexpr uint8_t kBdNameDelim = (uint8_t)'\0';

inline size_t bd_name_copy(BD_NAME bd_name_dest, const BD_NAME bd_name_src) {
  return strlcpy(reinterpret_cast<char*>(bd_name_dest), reinterpret_cast<const char*>(bd_name_src),