From 3f37f8d91a882bed7209679f0545b8f9ed884056 Mon Sep 17 00:00:00 2001 From: Virtual Maker <56232456+virtual-maker@users.noreply.github.com> Date: Wed, 6 Jul 2022 21:12:45 +0200 Subject: [PATCH] Replace memset() in PJONDefines.h to avoid build warning (#1527) (#1528) --- hal/transport/PJON/driver/PJONDefines.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hal/transport/PJON/driver/PJONDefines.h b/hal/transport/PJON/driver/PJONDefines.h index 6c7ffc359..744836b5e 100644 --- a/hal/transport/PJON/driver/PJONDefines.h +++ b/hal/transport/PJON/driver/PJONDefines.h @@ -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++];