mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-25 23:13:30 +00:00
mesh: Remove redundant AD parsing check
A few lines earlier the code bails out in case len is 0. Checking for buf->len < 1 is the same as checking for buf->len == 0. Since len is guaranteed to be > 0 here the check len > buf->len implicitly checks for buf->len == 0, i.e. the second test can be removed. X-Original-Commit: 7334e9616f742303cf848cd30ccb321758735320
This commit is contained in:
@@ -258,7 +258,7 @@ static void bt_mesh_scan_cb(const bt_addr_le_t *addr, s8_t rssi,
|
||||
return;
|
||||
}
|
||||
|
||||
if (len > buf->om_len || buf->om_len < 1) {
|
||||
if (len > buf->om_len) {
|
||||
BT_WARN("AD malformed");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user