From 4cdb3900d80854b084c9a5e43e7412b11a9ad115 Mon Sep 17 00:00:00 2001 From: frekky Date: Sat, 9 Jan 2016 15:05:16 +0800 Subject: [PATCH] Modify debug macro to use appropriate global instance --- src/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.h b/src/common.h index e360145..44266ad 100644 --- a/src/common.h +++ b/src/common.h @@ -91,7 +91,7 @@ extern const unsigned char raw_header[RAW_HDR_LEN]; fprintf(stderr, __VA_ARGS__); #define DEBUG(level, ...) \ - if (debug >= level) {\ + if (INSTANCE.debug >= level) {\ TIMEPRINT("[D%d %s:%d] ", level, __FILE__, __LINE__); \ fprintf(stderr, __VA_ARGS__);\ fprintf(stderr, "\n");\ @@ -101,7 +101,7 @@ extern const unsigned char raw_header[RAW_HDR_LEN]; fprintf(stderr, __VA_ARGS__); #define DEBUG(level, ...) \ - if (debug >= level) {\ + if (INSTANCE.debug >= level) {\ fprintf(stderr, "[D%d] ", level); \ fprintf(stderr, __VA_ARGS__);\ fprintf(stderr, "\n");\