You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/02/04 16:26:20 UTC

[mynewt-nimble] branch master updated: Add checks in defination of macro MIN / MAX, if they already not present

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 9fd55408 Add checks in defination of macro MIN / MAX, if they already not present
9fd55408 is described below

commit 9fd5540802b01e102dd822f03d97c365766040a9
Author: Rahul Tank <ra...@espressif.com>
AuthorDate: Thu Feb 3 15:32:03 2022 +0530

    Add checks in defination of macro MIN / MAX, if they already not present
---
 nimble/host/mesh/include/mesh/glue.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/nimble/host/mesh/include/mesh/glue.h b/nimble/host/mesh/include/mesh/glue.h
index 58e3e2d..36b82cf 100644
--- a/nimble/host/mesh/include/mesh/glue.h
+++ b/nimble/host/mesh/include/mesh/glue.h
@@ -308,8 +308,14 @@ void net_buf_reserve(struct os_mbuf *om, size_t reserve);
 
 #define BT_GATT_CCC_NOTIFY BLE_GATT_CHR_PROP_NOTIFY
 
+#ifndef MIN
 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
+#ifndef MAX
 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#endif
+
 /** Description of different data types that can be encoded into
   * advertising data. Used to form arrays that are passed to the
   * bt_le_adv_start() function.