-#define log_buf(buf, format, args...) \
-do { \
- if ((buf) != NULL) \
- __log_buf(buf, format, ##args); \
- else \
- log_info(format, ##args); \
-} while (0)
+#define log_buf(buf, format, args...) \
+({ \
+ size_t __ret; \
+ if ((buf) != NULL) \
+ __ret = __log_buf(buf, format, ##args); \
+ else \
+ __ret = log_info(format, ##args); \
+ __ret; \
+})