Skip to content

Commit

Permalink
logging: use #ifdef instead of #if
Browse files Browse the repository at this point in the history
use #ifdef to avoid to use undefined macros in #if expressions

Signed-off-by: Christoph Schnetzler <[email protected]>
  • Loading branch information
Christoph Schnetzler authored and aescolar committed Jun 17, 2024
1 parent 3c9e059 commit 239c20d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/zephyr/logging/log_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down

0 comments on commit 239c20d

Please sign in to comment.