mirror of
https://github.com/esphome/esphome.git
synced 2025-03-14 04:25:15 +01:00
Fix clang-tidy warnings
This commit is contained in:
parent
164cb3d32c
commit
c03f538106
1 changed files with 2 additions and 6 deletions
|
@ -52,11 +52,7 @@ bool XiaomiMCCGQ02HL::parse_device(const esp32_ble_tracker::ESPBTDevice &device)
|
|||
success = true;
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return success;
|
||||
}
|
||||
|
||||
void XiaomiMCCGQ02HL::set_bindkey(const std::string &bindkey) {
|
||||
|
@ -67,7 +63,7 @@ void XiaomiMCCGQ02HL::set_bindkey(const std::string &bindkey) {
|
|||
char temp[3] = {0};
|
||||
for (int i = 0; i < 16; i++) {
|
||||
strncpy(temp, &(bindkey.c_str()[i * 2]), 2);
|
||||
bindkey_[i] = std::strtoul(temp, NULL, 16);
|
||||
bindkey_[i] = std::strtoul(temp, nullptr, 16);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue