From: Fabian Keil <fk@fabiankeil.de>
Date: Fri, 25 Sep 2020 19:52:02 +0000 (+0200)
Subject: Relocate a variable declaration to the function where it is used
X-Git-Tag: v_3_0_29~79
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@edit-actions-add-url-form?a=commitdiff_plain;h=d7eafc9e857c09ab5c0d60b187d2481e0afb7031;p=privoxy.git

Relocate a variable declaration to the function where it is used
---

diff --git a/pcrs.c b/pcrs.c
index 582f0564..4a9e318d 100644
--- a/pcrs.c
+++ b/pcrs.c
@@ -1106,7 +1106,6 @@ char *pcrs_execute_single_command(const char *subject, const char *pcrs_command,
 }
 
 
-static const char warning[] = "... [too long, truncated]";
 /*********************************************************************
  *
  * Function    :  pcrs_compile_dynamic_command
@@ -1173,6 +1172,7 @@ pcrs_job *pcrs_compile_dynamic_command(char *pcrs_command, const struct pcrs_var
           * with a truncation message and close the pattern
           * properly.
           */
+         static const char warning[] = "... [too long, truncated]";
          const size_t trailer_size = sizeof(warning) + 3; /* 3 for d + "gT" */
          char *trailer_start = buf + sizeof(buf) - trailer_size;