[OpenWrt-Devel] [PATCH 12/12] uci_internal: use comma expression for UCI_INTERNAL() call.

Yousong Zhou yszhou4tech at gmail.com
Mon Dec 15 03:46:53 EST 2014


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 uci_internal.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/uci_internal.h b/uci_internal.h
index 89863f1..cb8f86c 100644
--- a/uci_internal.h
+++ b/uci_internal.h
@@ -227,10 +227,10 @@ struct uci_backend _var = {		\
  * Sets Exception handling to passthrough mode.
  * Allows API functions to change behavior compared to public use
  */
-#define UCI_INTERNAL(func, ctx, ...) do { \
-	ctx->internal = true;		\
-	func(ctx, __VA_ARGS__);		\
-} while (0)
+#define UCI_INTERNAL(func, ctx, ...) (	\
+	ctx->internal = true,		\
+	func(ctx, __VA_ARGS__)		\
+)
 
 /**
  * UCI_NESTED: Do an normal nested call of a public API function
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list