Skip to content

Commit

Permalink
Fix clang-tidy issue (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored Dec 26, 2024
1 parent e8eec79 commit 69037f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/xiaomi_ble/xiaomi_ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ optional<XiaomiParseResult> parse_xiaomi_header(const esp32_ble_tracker::Service
}

bool decrypt_xiaomi_payload(std::vector<uint8_t> &raw, const uint8_t *bindkey, const uint64_t &address) {
if (!((raw.size() == 19) || ((raw.size() >= 22) && (raw.size() <= 24)))) {
if ((raw.size() != 19) && ((raw.size() < 22) || (raw.size() > 24))) {
ESP_LOGVV(TAG, "decrypt_xiaomi_payload(): data packet has wrong size (%d)!", raw.size());
ESP_LOGVV(TAG, " Packet : %s", hexencode(raw.data(), raw.size()).c_str());
return false;
Expand Down

0 comments on commit 69037f9

Please sign in to comment.