From 8950bd6917018807a884e7363f0574be20876ca1 Mon Sep 17 00:00:00 2001 From: Allen Hill Date: Tue, 21 Jul 2026 12:51:18 -0700 Subject: [PATCH] Make b3 const --- src/avclan/peripheral.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/avclan/peripheral.hpp b/src/avclan/peripheral.hpp index 42acce3..5ea4c33 100644 --- a/src/avclan/peripheral.hpp +++ b/src/avclan/peripheral.hpp @@ -100,9 +100,9 @@ public: const uint8_t b0 = *data++; const uint8_t b1 = *data++; const uint8_t b2 = *data++; - uint8_t b3 = 0; - if (in.length > 3) // the shortest known/valid messages are 3 bytes long - b3 = *data++; + + // the shortest known/valid messages are 3 bytes long + const uint8_t b3 = (in.length > 3) ? *data++ : 0; if (!in.is_unicast) { const auto from = b0;