summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index e3e9172..e21822d 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -324,11 +324,12 @@ static const int LZ4_minLength = (MFLIMIT+1);
#if defined(LZ4_DEBUG) && (LZ4_DEBUG>=2)
# include <stdio.h>
-# define DEBUGLOG(l, ...) { \
- if (l<=LZ4_DEBUG) { \
- fprintf(stderr, __FILE__ ": "); \
- fprintf(stderr, __VA_ARGS__); \
- fprintf(stderr, " \n"); \
+static int g_debuglog_enable = 1;
+# define DEBUGLOG(l, ...) { \
+ if ((g_debuglog_enable) && (l<=LZ4_DEBUG)) { \
+ fprintf(stderr, __FILE__ ": "); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, " \n"); \
} }
#else
# define DEBUGLOG(l, ...) {} /* disabled */
@@ -978,6 +979,7 @@ LZ4_stream_t* LZ4_createStream(void)
void LZ4_resetStream (LZ4_stream_t* LZ4_stream)
{
+ DEBUGLOG(4, "LZ4_resetStream");
MEM_INIT(LZ4_stream, 0, sizeof(LZ4_stream_t));
}