Minor cppcheck fixes (#5689)
* In graphics/Screen.cpp, a copy/paste error to do with hearts * In mesh/http/ContentHandler.cpp, an unused variable * in mqtt/MQTT.cpp, remove unneded logic " '!A || (A && B)' is equivalent to '!A || B'"
This commit is contained in:
+1
-2
@@ -627,8 +627,7 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp_encrypted, const meshtastic_Me
|
||||
// mp_decoded will not be decoded when it's PKI encrypted and not directed to us
|
||||
if (mp_decoded.which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
|
||||
// For uplinking other's packets, check if it's not OK to MQTT or if it's an older packet without the bitfield
|
||||
bool dontUplink = !mp_decoded.decoded.has_bitfield ||
|
||||
(mp_decoded.decoded.has_bitfield && !(mp_decoded.decoded.bitfield & BITFIELD_OK_TO_MQTT_MASK));
|
||||
bool dontUplink = !mp_decoded.decoded.has_bitfield || !(mp_decoded.decoded.bitfield & BITFIELD_OK_TO_MQTT_MASK);
|
||||
// check for the lowest bit of the data bitfield set false, and the use of one of the default keys.
|
||||
if (!isFromUs(&mp_decoded) && !isMqttServerAddressPrivate && dontUplink &&
|
||||
(ch.settings.psk.size < 2 || (ch.settings.psk.size == 16 && memcmp(ch.settings.psk.bytes, defaultpsk, 16)) ||
|
||||
|
||||
Reference in New Issue
Block a user