fix a lot of nuisances reported by cppcheck (#4872)

* fix a lot of nuisances reported by cppcheck

* fix portduino
This commit is contained in:
Thomas Göttgens authored and GitHub committed 2024-09-25 19:09:06 -05:00
1 parent 118809fbfc
commit 12481b568a
18 files changed
+33 -35

No files matched your search

+2 -2
View File
@@ -1026,7 +1026,7 @@ bool AdminModule::checkPassKey(meshtastic_AdminMessage *res)
memcmp(res->session_passkey.bytes, session_passkey, 8) == 0);
}
bool AdminModule::messageIsResponse(meshtastic_AdminMessage *r)
bool AdminModule::messageIsResponse(const meshtastic_AdminMessage *r)
{
if (r->which_payload_variant == meshtastic_AdminMessage_get_channel_response_tag ||
r->which_payload_variant == meshtastic_AdminMessage_get_owner_response_tag ||
@@ -1043,7 +1043,7 @@ bool AdminModule::messageIsResponse(meshtastic_AdminMessage *r)
return false;
}
bool AdminModule::messageIsRequest(meshtastic_AdminMessage *r)
bool AdminModule::messageIsRequest(const meshtastic_AdminMessage *r)
{
if (r->which_payload_variant == meshtastic_AdminMessage_get_channel_request_tag ||
r->which_payload_variant == meshtastic_AdminMessage_get_owner_request_tag ||