btif: Add do-while blocks to macros
Test: mma -j32
Change-Id: Ie82465b8cef6c4f527fad13892abb365e15dad7c
diff --git a/btif/src/btif_pan.cc b/btif/src/btif_pan.cc
index 5322e2c..2d0696a 100644
--- a/btif/src/btif_pan.cc
+++ b/btif/src/btif_pan.cc
@@ -80,10 +80,12 @@
#define BTPAN_LOCAL_ROLE (BTPAN_ROLE_PANU | BTPAN_ROLE_PANNAP)
#endif
-#define asrt(s) \
- if (!(s)) \
- BTIF_TRACE_ERROR("btif_pan: ## %s assert %s failed at line:%d ##", __func__, \
- #s, __LINE__)
+#define asrt(s) \
+ do { \
+ if (!(s)) \
+ BTIF_TRACE_ERROR("btif_pan: ## %s assert %s failed at line:%d ##", \
+ __func__, #s, __LINE__) \
+ } while (0)
#define MIN(x, y) (((x) < (y)) ? (x) : (y))