]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
basic_ncsa_auth: fix unused variable warnings (typo in rev.12762)
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 2 Jun 2013 15:50:00 +0000 (09:50 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 2 Jun 2013 15:50:00 +0000 (09:50 -0600)
When libcrypto is absent the passwordLength variable becomes unused.
Detected by Windows build farm node.

helpers/basic_auth/NCSA/basic_ncsa_auth.cc

index 988f625a5d2fc5b329442ecbc276a31e9d3021d4..c65330e8da5bde86e7fc65f20576d9aa39f65477 100644 (file)
@@ -149,8 +149,8 @@ main(int argc, char **argv)
             continue;
         }
         char *crypted = NULL;
-        size_t passwordLength = strlen(passwd);
 #if HAVE_CRYPT
+        size_t passwordLength = strlen(passwd);
         // Bug 3831: given algorithms more secure than DES crypt() does not truncate, so we can ignore the bug 3107 length checks below
         // '$1$' = MD5, '$2a$' = Blowfish, '$5$' = SHA256 (Linux), '$6$' = SHA256 (BSD) and SHA512
         if (passwordLength > 1 && u->passwd[0] == '$' &&