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

Commit 9fef3297 authored by bidsharma's avatar bidsharma
Browse files

[Gatt Test] Properly initialize attr value

Initialize attribute value to zero properly. Executing on x86 is filling
it with garbage value causing the test to fail.

Test: atest GattCacheTest#stored_attribute_to_binary_descriptor_test --
--abi x86
Bug: 262348171
Tag: #refactor

Change-Id: I519c116e1d5eaeff778f68c9715e54292e46b1db
parent 82c72633
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -202,7 +202,9 @@ TEST(GattCacheTest, stored_attribute_to_binary_descriptor_test) {
  /* make sure padding at end of union is cleared */
  memset(&attr, 0, sizeof(attr));

  attr = {.handle = 0x0003, .type = Uuid::FromString("2902"), .value = {}};
  attr = {.handle = 0x0003,
          .type = Uuid::FromString("2902"),
          .value = {.characteristic_extended_properties = 0x00}};

  constexpr size_t len = sizeof(StoredAttribute);
  // clang-format off