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 2019/03/01 11:10:54 UTC

[mynewt-nimble] 02/02: porting: Fix build error

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

commit a39b15bf4bf51b6eedc6890b2e94ba39f2f447a2
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Thu Feb 28 15:23:53 2019 +0100

    porting: Fix build error
    
    'OS_ASSERT_CRITICAL();' won't build if assert is defined as 'if () {}'.
---
 porting/nimble/include/os/os.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/porting/nimble/include/os/os.h b/porting/nimble/include/os/os.h
index 40fc267..f7a7ef9 100644
--- a/porting/nimble/include/os/os.h
+++ b/porting/nimble/include/os/os.h
@@ -47,7 +47,7 @@ extern "C" {
 typedef uint32_t os_sr_t;
 #define OS_ENTER_CRITICAL(_sr) (_sr = ble_npl_hw_enter_critical())
 #define OS_EXIT_CRITICAL(_sr) (ble_npl_hw_exit_critical(_sr))
-#define OS_ASSERT_CRITICAL() (assert(ble_npl_hw_is_in_critical()))
+#define OS_ASSERT_CRITICAL() assert(ble_npl_hw_is_in_critical())
 
 /* Mynewt components (not abstracted in NPL) */
 #include "os/endian.h"