Skip to content

Commit

Permalink
Make sure unit test buffers are initialized, so that valgrind does no…
Browse files Browse the repository at this point in the history
…t complain (#15487)
  • Loading branch information
andy31415 authored and pull[bot] committed Aug 3, 2023
1 parent a30de86 commit d8a3db6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/transport/raw/tests/TestMessageHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ void TestPayloadHeaderEncodeDecode(nlTestSuite * inSuite, void * inContext)
void TestPacketHeaderEncodeDecodeBounds(nlTestSuite * inSuite, void * inContext)
{
PacketHeader header;
uint8_t buffer[64];
uint16_t unusedLen;
uint8_t buffer[64] = {};
uint16_t unusedLen = 0;

for (uint16_t shortLen = 0; shortLen < 8; shortLen++)
{
Expand Down Expand Up @@ -294,8 +294,8 @@ void TestPacketHeaderEncodeDecodeBounds(nlTestSuite * inSuite, void * inContext)
void TestPayloadHeaderEncodeDecodeBounds(nlTestSuite * inSuite, void * inContext)
{
PayloadHeader header;
uint8_t buffer[64];
uint16_t unusedLen;
uint8_t buffer[64] = {};
uint16_t unusedLen = 0;

for (uint16_t shortLen = 0; shortLen < 6; shortLen++)
{
Expand Down

0 comments on commit d8a3db6

Please sign in to comment.