From 63e784ca8cb4adb0533e4d646a9cc6424f799138 Mon Sep 17 00:00:00 2001 From: Bradley Bolen Date: Mon, 13 May 2019 16:41:57 -0400 Subject: [PATCH] logging: Fix checks of Kconfig option The compiler was generating errors of the form error: "CONFIG_LOG" is not defined, evaluates to 0 [-Werror=undef] when -Wundef is used and the config option was turned off. Change check to ifdef/ifndef. Signed-off-by: Bradley Bolen --- include/logging/log_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/logging/log_core.h b/include/logging/log_core.h index c76da481de5..ebc35c09165 100644 --- a/include/logging/log_core.h +++ b/include/logging/log_core.h @@ -20,7 +20,7 @@ extern "C" { #error "Logger does not support 64 bit architecture." #endif -#if !CONFIG_LOG +#ifndef CONFIG_LOG #define CONFIG_LOG_DEFAULT_LEVEL 0 #define CONFIG_LOG_DOMAIN_ID 0 #define CONFIG_LOG_MAX_LEVEL 0 @@ -330,7 +330,7 @@ extern "C" { #define LOG_FILTER_FIRST_BACKEND_SLOT_IDX 1 -#if CONFIG_LOG_RUNTIME_FILTERING +#ifdef CONFIG_LOG_RUNTIME_FILTERING #define LOG_RUNTIME_FILTER(_filter) \ LOG_FILTER_SLOT_GET(&(_filter)->filters, LOG_FILTER_AGGR_SLOT_IDX) #else