From 239c20d2c7c86a6b59275cb9475780f32882d647 Mon Sep 17 00:00:00 2001 From: Christoph Schnetzler Date: Thu, 13 Jun 2024 10:10:50 +0200 Subject: [PATCH] logging: use #ifdef instead of #if use #ifdef to avoid to use undefined macros in #if expressions Signed-off-by: Christoph Schnetzler --- include/zephyr/logging/log_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/zephyr/logging/log_core.h b/include/zephyr/logging/log_core.h index 71ee52918385b8..053524a29d1e18 100644 --- a/include/zephyr/logging/log_core.h +++ b/include/zephyr/logging/log_core.h @@ -197,7 +197,7 @@ static inline char z_log_minimal_level_to_char(int level) * emitted instead. String check may increase compilation time so it is not * always performed (could significantly increase CI time). */ -#if defined(CONFIG_LOG_FMT_STRING_VALIDATE) && CONFIG_LOG_FMT_STRING_VALIDATE +#ifdef CONFIG_LOG_FMT_STRING_VALIDATE #define LOG_STRING_WARNING(_mode, _src, ...) \ Z_LOG_MSG_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \ Z_LOG_LOCAL_DOMAIN_ID, _src, LOG_LEVEL_ERR, NULL, 0, \