Skip to content

Commit

Permalink
nimble/host: Fix a build warning caused by using undeclared min function
Browse files Browse the repository at this point in the history
Use of undeclared min function causes build warning. Declare the min
and max function in file ble_l2cap_coc.c
  • Loading branch information
guy-m authored Jan 3, 2025
1 parent 734a53d commit 2a14c85
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nimble/host/src/ble_l2cap_coc.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@

#if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) != 0 && NIMBLE_BLE_CONNECT

#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif

#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif

#define BLE_L2CAP_SDU_SIZE 2

STAILQ_HEAD(ble_l2cap_coc_srv_list, ble_l2cap_coc_srv);
Expand Down

0 comments on commit 2a14c85

Please sign in to comment.