[i18ninfo] Fix MACRO error 40/148140/5
authorHyunjee Kim <hj0426.kim@samsung.com>
Thu, 7 Sep 2017 02:08:32 +0000 (11:08 +0900)
committerhyunjee Kim <hj0426.kim@samsung.com>
Wed, 18 Oct 2017 01:37:56 +0000 (01:37 +0000)
- PRINT_DEBUG_LOG

Change-Id: I65acd4a0be725afa71c61c699d2506e17d68854e
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
i18ninfo/i18ninfo.cpp

index aa418d9..cdda84b 100644 (file)
@@ -16,14 +16,10 @@ static int ASCIIDOC_FLAG = 0;
 #define MS_TO_MIN 60000
 #define MS_TO_HOUR 3600000
 
-#define PRINT_ERROR_LOG(func_name, error_code) if (DEBUG_FLAG) { \
-               fprintf(stderr, "\033[0;31m%s failed! Error: %s [code: %d] \033[0m\n", \
-                               func_name, get_error_message(error_code), error_code); \
-       }
+#define PRINT_ERROR_LOG(func_name, error_code) ({ fprintf(stderr, "\033[0;31m%s failed! Error: %s [code: %d] \033[0m\n", \
+                       func_name, get_error_message(error_code), error_code); })
 
-#define PRINT_DEBUG_LOG(fmt, arg...) if (DEBUG_FLAG) { do {\
-                       fprintf(stdout, "\033[0;32m" fmt "\033[1;32m \033[0m", ##arg); } while (0); \
-       }
+#define PRINT_DEBUG_LOG(fmt, arg...) ((DEBUG_FLAG) ? fprintf(stdout, "\033[0;32m" fmt "\033[1;32m \033[0m", ##arg) : 0 )
 
 #define CHECK_ERROR(fun_name, error_code) if (error_code != 0) { \
                PRINT_ERROR_LOG(fun_name, error_code); \