You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2022/04/13 10:03:57 UTC
[mynewt-nimble] branch master updated: nimble/host: Remove redundant check in connection latency
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 33a55744 nimble/host: Remove redundant check in connection latency
33a55744 is described below
commit 33a5574444874880bc4907b521eeb96845a89412
Author: Prasad Alatkar <pr...@espressif.com>
AuthorDate: Thu Jul 15 15:13:01 2021 +0530
nimble/host: Remove redundant check in connection latency
* The `params->latency` is uint16_t and BLE_HCI_CONN_LATENCY_MIN is 0 which is
why we can drop it.
---
nimble/host/src/ble_gap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c
index 621a88a0..7e650fd9 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -4659,8 +4659,7 @@ ble_gap_check_conn_params(uint8_t phy, const struct ble_gap_conn_params *params)
}
/* Check connection latency */
- if ((params->latency < BLE_HCI_CONN_LATENCY_MIN) ||
- (params->latency > BLE_HCI_CONN_LATENCY_MAX)) {
+ if (params->latency > BLE_HCI_CONN_LATENCY_MAX) {
return BLE_ERR_INV_HCI_CMD_PARMS;
}