summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/printk.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/printk.h b/include/printk.h
index 3de890547..3cd733547 100644
--- a/include/printk.h
+++ b/include/printk.h
@@ -46,10 +46,7 @@ int dev_printf(const struct device_d *dev, const char *format, ...)
#define __pr_printk(level, format, args...) \
({ \
- int ret = 0; \
- if (level <= LOGLEVEL) \
- ret = printk(format, ##args); \
- ret; \
+ (level) <= LOGLEVEL ? printk((format), ##args) : 0; \
})
#ifndef pr_fmt