]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed build issue with ./configure --disable-socks --disable-http.
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Sun, 10 Aug 2008 19:29:00 +0000 (19:29 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Sun, 10 Aug 2008 19:29:00 +0000 (19:29 +0000)
Fixed separate compile errors in options.c and ntlm.c that occur
on strict C compilers (such as old versions of gcc) that require
that C variable declarations occur at the start of a {} block,
not in the middle.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3219 e7ae566f-a301-0410-adde-c780ea21d3b5

init.c
ntlm.c
options.c

diff --git a/init.c b/init.c
index 5bd8cf61585b0b0e1ad35e9b0b8bc3362f1cb72c..08918d646cceaffacf5ecc5995f271a7153611d0 100644 (file)
--- a/init.c
+++ b/init.c
@@ -288,7 +288,7 @@ init_proxy (struct context *c, const int scope)
 }
 
 static inline void
-uninit_proxy (struct context *c, const int scope)
+uninit_proxy (struct context *c)
 {
 }
 
diff --git a/ntlm.c b/ntlm.c
index 558cd1bcdabdca5c0b3b28fe56bf809144aab768..62fe43c60494170550da94f1d299738559b305fe 100644 (file)
--- a/ntlm.c
+++ b/ntlm.c
@@ -256,7 +256,8 @@ ntlm_phase_3 (const struct http_proxy_info *p, const char *phase_2, struct gc_ar
   }
 
        if (ntlmv2_enabled){ /* Generate NTLMv2 response */
-               
+               int tib_len;
+
                /* NTLMv2 hash */
                my_strupr((unsigned char *)strcpy(userdomain, username));
                if (strlen(username) + strlen(domain) < sizeof(userdomain))
@@ -276,7 +277,6 @@ ntlm_phase_3 (const struct http_proxy_info *p, const char *phase_2, struct gc_ar
                ntlmv2_blob[0x18]=0;                        /* Unknown, zero should work */
 
                /* Add target information block to the blob */
-               int tib_len;
                if (( *((long *)&buf2[0x14]) & 0x00800000) == 0x00800000){ /* Check for Target Information block */
                        tib_len = buf2[0x28];/* Get Target Information block size */
                        if (tib_len > 96) tib_len = 96;
index ccbbffae6e540e8e25fac0d08998afc1f79f56d0..69f3731575a628ce935a4a5084208f62ba9782d0 100644 (file)
--- a/options.c
+++ b/options.c
@@ -3249,9 +3249,9 @@ add_option (struct options *options,
            struct env_set *es)
 {
   struct gc_arena gc = gc_new ();
-  ASSERT (MAX_PARMS >= 5);
   const bool pull_mode = BOOL_CAST (permission_mask & OPT_P_PULL_MODE);
 
+  ASSERT (MAX_PARMS >= 5);
   if (!file)
     {
       file = "[CMD-LINE]";