mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-30 02:37:31 +02:00
fix(modem): Fix other clang-tidy warnings
This commit is contained in:
@ -150,7 +150,7 @@ bool CMux::data_available(uint8_t *data, size_t len)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if ((type & FT_UIH) == FT_UIH && dlci == 0) { // notify the internal DISC command
|
} else if ((type & FT_UIH) == FT_UIH && dlci == 0) { // notify the internal DISC command
|
||||||
if ((len > 0 && (data[0] & 0xE1) == 0xE1) || (data == nullptr)) {
|
if ((data == nullptr) || (len > 0 && (data[0] & 0xE1) == 0xE1)) {
|
||||||
// Not a DISC, ignore (MSC frame)
|
// Not a DISC, ignore (MSC frame)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -346,6 +346,9 @@ bool CMux::on_cmux_data(uint8_t *data, size_t actual_len)
|
|||||||
actual_len = term->read(data, buffer.size);
|
actual_len = term->read(data, buffer.size);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
if (data == nullptr) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ESP_LOG_BUFFER_HEXDUMP("CMUX Received", data, actual_len, ESP_LOG_VERBOSE);
|
ESP_LOG_BUFFER_HEXDUMP("CMUX Received", data, actual_len, ESP_LOG_VERBOSE);
|
||||||
CMuxFrame frame = { .ptr = data, .len = actual_len };
|
CMuxFrame frame = { .ptr = data, .len = actual_len };
|
||||||
while (frame.len > 0) {
|
while (frame.len > 0) {
|
||||||
|
Reference in New Issue
Block a user