make clang-format happy again. Also fix assorted variable shrouding and logic bleeps

This commit is contained in:
Thomas Göttgens
2024-05-03 15:10:57 +02:00
parent 9fb6148aff
commit 13ad524538
9 changed files with 22 additions and 26 deletions

View File

@@ -95,12 +95,11 @@ template <class T> class ProtobufModule : protected SinglePortModule
*/
virtual void alterReceived(meshtastic_MeshPacket &mp) override
{
auto &p = mp.decoded;
T scratch;
T *decoded = NULL;
if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.decoded.portnum == ourPortNum) {
memset(&scratch, 0, sizeof(scratch));
auto &p = mp.decoded;
if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, fields, &scratch)) {
decoded = &scratch;
} else {