From: Fabian Keil <fk@fabiankeil.de>
Date: Fri, 5 Oct 2012 12:16:23 +0000 (+0000)
Subject: Move a variable declaration in parse_client_header_order() to the beginning of its... 
X-Git-Tag: v_3_0_20~264
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/static/man-page/static/gitweb.js?a=commitdiff_plain;h=ace007919482c407568b37292a05ad56e4a47660;p=privoxy.git

Move a variable declaration in parse_client_header_order() to the beginning of its code block

It's how we usually do it and is apparently also required
when compiling with gcc 2.95.

Initial patch submitted by Simon South in #3564815.
---

diff --git a/loadcfg.c b/loadcfg.c
index 9a7a52d7..e893f77f 100644
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -1,4 +1,4 @@
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.129 2012/06/08 15:15:11 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.130 2012/07/27 17:36:06 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
@@ -339,6 +339,7 @@ static void parse_client_header_order(struct list *ordered_header_list, const ch
 {
    char *original_headers_copy;
    char **vector;
+   size_t max_segments;
    int number_of_headers;
    int i;
 
@@ -356,7 +357,7 @@ static void parse_client_header_order(struct list *ordered_header_list, const ch
     *      The same hack is used in get_last_url() so it looks like
     *      a real solution is needed.
     */
-   size_t max_segments = strlen(ordered_headers) / 2;
+   max_segments = strlen(ordered_headers) / 2;
    if (max_segments == 0)
    {
       max_segments = 1;