From cea78d32c29b72950f4778817ccea2b3705271ec Mon Sep 17 00:00:00 2001 From: timoxd7 Date: Tue, 15 Nov 2022 21:11:04 +0100 Subject: [PATCH] Fixed min/max formatting --- nimble/host/src/ble_att.c | 4 ++-- nimble/host/src/ble_gap.c | 4 ++-- nimble/host/src/ble_gattc.c | 4 ++-- nimble/host/src/ble_hs_hci_util.c | 4 ++-- nimble/host/src/ble_sm.c | 4 ++-- porting/nimble/src/os_mbuf.c | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nimble/host/src/ble_att.c b/nimble/host/src/ble_att.c index 81e08aa04..d2b460ce3 100644 --- a/nimble/host/src/ble_att.c +++ b/nimble/host/src/ble_att.c @@ -25,11 +25,11 @@ #if NIMBLE_BLE_CONNECT #ifndef min -#define min(a, b) ((a)<(b)?(a):(b)) +#define min(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef max -#define max(a, b) ((a)>(b)?(a):(b)) +#define max(a, b) ((a) > (b) ? (a) : (b)) #endif static uint16_t ble_att_preferred_mtu_val; diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c index 89fc39408..ba1ec7fb0 100644 --- a/nimble/host/src/ble_gap.c +++ b/nimble/host/src/ble_gap.c @@ -28,11 +28,11 @@ #include "ble_gap_priv.h" #ifndef min -#define min(a, b) ((a)<(b)?(a):(b)) +#define min(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef max -#define max(a, b) ((a)>(b)?(a):(b)) +#define max(a, b) ((a) > (b) ? (a) : (b)) #endif #if MYNEWT diff --git a/nimble/host/src/ble_gattc.c b/nimble/host/src/ble_gattc.c index d2b198fa6..4763f14ef 100644 --- a/nimble/host/src/ble_gattc.c +++ b/nimble/host/src/ble_gattc.c @@ -64,11 +64,11 @@ #if NIMBLE_BLE_CONNECT #ifndef min -#define min(a, b) ((a)<(b)?(a):(b)) +#define min(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef max -#define max(a, b) ((a)>(b)?(a):(b)) +#define max(a, b) ((a) > (b) ? (a) : (b)) #endif /***************************************************************************** diff --git a/nimble/host/src/ble_hs_hci_util.c b/nimble/host/src/ble_hs_hci_util.c index cb55469c2..f9897acaa 100644 --- a/nimble/host/src/ble_hs_hci_util.c +++ b/nimble/host/src/ble_hs_hci_util.c @@ -23,11 +23,11 @@ #include "ble_hs_priv.h" #ifndef min -#define min(a, b) ((a)<(b)?(a):(b)) +#define min(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef max -#define max(a, b) ((a)>(b)?(a):(b)) +#define max(a, b) ((a) > (b) ? (a) : (b)) #endif uint16_t diff --git a/nimble/host/src/ble_sm.c b/nimble/host/src/ble_sm.c index 9a66de304..4658e1d2b 100644 --- a/nimble/host/src/ble_sm.c +++ b/nimble/host/src/ble_sm.c @@ -51,11 +51,11 @@ #if NIMBLE_BLE_CONNECT #ifndef min -#define min(a, b) ((a)<(b)?(a):(b)) +#define min(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef max -#define max(a, b) ((a)>(b)?(a):(b)) +#define max(a, b) ((a) > (b) ? (a) : (b)) #endif #if NIMBLE_BLE_SM diff --git a/porting/nimble/src/os_mbuf.c b/porting/nimble/src/os_mbuf.c index 804badc82..f65907032 100644 --- a/porting/nimble/src/os_mbuf.c +++ b/porting/nimble/src/os_mbuf.c @@ -42,11 +42,11 @@ #include #ifndef min -#define min(a, b) ((a)<(b)?(a):(b)) +#define min(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef max -#define max(a, b) ((a)>(b)?(a):(b)) +#define max(a, b) ((a) > (b) ? (a) : (b)) #endif /**