From 29c3748788ff5ba0e4b14b02dfa15080177a3c8c Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 19 Apr 2021 20:39:42 +0200 Subject: [PATCH] lib: Make EXPAT_ENTROPY_DEBUG consistent with other EXPAT_*_DEBUG variables --- expat/lib/xmlparse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 641f005c..adaab233 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -887,8 +887,7 @@ gather_time_entropy(void) { static unsigned long ENTROPY_DEBUG(const char *label, unsigned long entropy) { - const char *const EXPAT_ENTROPY_DEBUG = getenv("EXPAT_ENTROPY_DEBUG"); - if (EXPAT_ENTROPY_DEBUG && ! strcmp(EXPAT_ENTROPY_DEBUG, "1")) { + if (getDebugLevel("EXPAT_ENTROPY_DEBUG", 0) >= 1u) { fprintf(stderr, "expat: Entropy: %s --> 0x%0*lx (%lu bytes)\n", label, (int)sizeof(entropy) * 2, entropy, (unsigned long)sizeof(entropy)); }