Skip to content

Commit

Permalink
Replace memset() in PJONDefines.h to avoid build warning (#1527) (#1528)
Browse files Browse the repository at this point in the history
  • Loading branch information
virtual-maker authored Jul 6, 2022
1 parent 423b9d7 commit 3f37f8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hal/transport/PJON/driver/PJONDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,9 @@ struct PJONTools {

static void parse_header(const uint8_t *packet, PJON_Packet_Info &info)
{
memset(&info, 0, sizeof info);
uint8_t index = 0;
info = PJON_Packet_Info{};

info.rx.id = packet[index++];
bool extended_length = packet[index] & PJON_EXT_LEN_BIT;
info.header = packet[index++];
Expand Down

0 comments on commit 3f37f8d

Please sign in to comment.