From: Fabian Keil <fk@fabiankeil.de>
Date: Thu, 4 Feb 2021 12:38:09 +0000 (+0100)
Subject: log_error(): Silence a warning when compiling with NDEBUG
X-Git-Tag: v_3_0_32~80
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/user-manual/faq/static/diff?a=commitdiff_plain;h=d15d72235206a3c2925a4f96471b443fc51d90bc;p=privoxy.git

log_error(): Silence a warning when compiling with NDEBUG
---

diff --git a/errlog.c b/errlog.c
index 969c0bd7..e9aba277 100644
--- a/errlog.c
+++ b/errlog.c
@@ -815,7 +815,10 @@ void log_error(int loglevel, const char *fmt, ...)
                   int ret = snprintf(outbuf + length,
                      log_buffer_size - length - 2, "\\x%.2x", (unsigned char)*sval);
                   assert(ret == 4);
-                  length += 4;
+                  if (ret == 4)
+                  {
+                     length += 4;
+                  }
                }
                sval++;
             }