From 06a3ca6081d0b7a91f681cb6299227eb394190e3 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 3 Sep 2024 09:36:34 +0200 Subject: [PATCH] debug_dump: early return Currently, if log_level isn't at least DEBUG, nothing will be printed, anyways. --- src/debug.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/debug.cpp b/src/debug.cpp index dc0836fa5..3c337f431 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -178,6 +178,9 @@ void log_perror(int level, const char *msg) **/ void debug_dump(const void *lp, int len) { + if (log_level < LOG_LEVEL_DEBUG) { + return; + } const char *p; int i, j, start; char Buff[81];