Skip to content

Commit afd4529

Browse files
committed
fix portability: add min() macro
Add min() macro definition to improve portability.
1 parent 6c72595 commit afd4529

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

nimble/controller/src/ble_ll_ctrl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
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+
3741
#if MYNEWT_VAL(BLE_LL_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_LL_ROLE_CENTRAL)
3842

3943
/* To use spec sample data for testing */

0 commit comments

Comments
 (0)