From 87d6296b5b2fbd340a0ab5af1fe235a34ac835d1 Mon Sep 17 00:00:00 2001 From: Sangjung Woo Date: Thu, 11 Jun 2015 15:24:11 +0900 Subject: fixbug: fix the compile time error After upgrading the dlog module, neard faced the compile time error since LOG_ON() macro basically does not return anything. However, some macros such as NEARDAL_TRACE_ERR() usg this macro to check whether dlog is enable or not. This is definitely a bug so this patch fixes this issue. Change-Id: I3d5e61fc245b4160b323c41b9d4ec71cab0fe3fb Signed-off-by: Sangjung Woo --- lib/neardal_traces_prv.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/neardal_traces_prv.h b/lib/neardal_traces_prv.h index 9e9088e..5b463b1 100644 --- a/lib/neardal_traces_prv.h +++ b/lib/neardal_traces_prv.h @@ -34,14 +34,14 @@ #define NEARDAL_TRACEIN() neardal_trace(__func__, stdout, \ "Processing...\n") #else - #define NEARDAL_TRACE(format, arg...) (LOG_ON() ? (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0)) - #define NEARDAL_TRACEF(format, arg...) (LOG_ON() ? (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0)) - #define NEARDAL_TRACEIN(format, arg...) (LOG_ON() ? (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0)) + #define NEARDAL_TRACE(format, arg...) (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) + #define NEARDAL_TRACEF(format, arg...) (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) + #define NEARDAL_TRACEIN(format, arg...) (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) #define NEARDAL_TRACEDUMP(...) #endif /* NEARDAL_DEBUG */ /* always defined */ -#define NEARDAL_TRACE_LOG(format, arg...) (LOG_ON() ? (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0)) -#define NEARDAL_TRACE_ERR(format, arg...) (LOG_ON() ? (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) : (0)) +#define NEARDAL_TRACE_LOG(format, arg...) (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) +#define NEARDAL_TRACE_ERR(format, arg...) (LOG(LOG_DEBUG, "NEARDAL", "%s:%s(%d)>" format, __MODULE__, __func__, __LINE__, ##arg)) void neardal_trace(const char *func, FILE *stream, char *format, ...) __attribute__((format(printf, 3, 4))); -- cgit v1.2.3