Skip to content

Commit 7651395

Browse files
committed
fix portability: replace min() macro with MIN()
Replace min() macro usage with MIN() for portability reasons.
1 parent afd4529 commit 7651395

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

nimble/controller/src/ble_ll_ctrl.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
#include "controller/ble_ll_tmr.h"
3535
#include "ble_ll_conn_priv.h"
3636

37-
#ifndef min
38-
#define min(a, b) ((a) < (b) ? (a) : (b))
39-
#endif
40-
4137
#if MYNEWT_VAL(BLE_LL_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_LL_ROLE_CENTRAL)
4238

4339
/* To use spec sample data for testing */
@@ -2135,7 +2131,7 @@ ble_ll_conn_chk_conn_update_req(const struct ble_ll_conn_upd_req *req)
21352131
/* The transmitWindowSize shall be a multiple of 1.25 ms in the range
21362132
* 1.25 ms to the lesser of 10 ms and (connInterval - 1.25 ms).
21372133
*/
2138-
if ((req->winsize < 1) || (req->winsize > min(8, req->interval - 1))) {
2134+
if ((req->winsize < 1) || (req->winsize > MIN(8, req->interval - 1))) {
21392135
return false;
21402136
}
21412137

0 commit comments

Comments
 (0)