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/11/22 09:07:54 UTC

[mynewt-nimble] 03/03: Fixed min/max formatting

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

commit cea78d32c29b72950f4778817ccea2b3705271ec
Author: timoxd7 <ti...@gmx.de>
AuthorDate: Tue Nov 15 21:11:04 2022 +0100

    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 81e08aa0..d2b460ce 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 89fc3940..ba1ec7fb 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 d2b198fa..4763f14e 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 cb55469c..f9897aca 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 9a66de30..4658e1d2 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 804badc8..f6590703 100644
--- a/porting/nimble/src/os_mbuf.c
+++ b/porting/nimble/src/os_mbuf.c
@@ -42,11 +42,11 @@
 #include <limits.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
 
 /**