]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Undo castings caught by gcc4.3, squid_ldap_auth in 3.1 is C not C++
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 10 Nov 2009 11:42:35 +0000 (12:42 +0100)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 10 Nov 2009 11:42:35 +0000 (12:42 +0100)
helpers/basic_auth/LDAP/squid_ldap_auth.c

index 80142bf144c078c5aabee5427eb932ffdd70e8f3..2e36ca66b985af50ac8bb2095e20473b6d89f3fd 100644 (file)
@@ -176,7 +176,7 @@ squid_ldap_set_aliasderef(LDAP * ld, int deref)
 static void
 squid_ldap_set_referrals(LDAP * ld, int referrals)
 {
-    int *value = static_cast<int*>(referrals ? LDAP_OPT_ON :LDAP_OPT_OFF);
+    int *value = referrals ? LDAP_OPT_ON :LDAP_OPT_OFF;
     ldap_set_option(ld, LDAP_OPT_REFERRALS, value);
 }
 static void
@@ -385,7 +385,7 @@ main(int argc, char **argv)
         case 'h':
             if (ldapServer) {
                 int len = strlen(ldapServer) + 1 + strlen(value) + 1;
-                char *newhost = static_cast<char*>(malloc(len));
+                char *newhost = malloc(len);
                 snprintf(newhost, len, "%s %s", ldapServer, value);
                 free(ldapServer);
                 ldapServer = newhost;
@@ -505,7 +505,7 @@ main(int argc, char **argv)
         char *value = argv[1];
         if (ldapServer) {
             int len = strlen(ldapServer) + 1 + strlen(value) + 1;
-            char *newhost = static_cast<char*>(malloc(len));
+            char *newhost = malloc(len);
             snprintf(newhost, len, "%s %s", ldapServer, value);
             free(ldapServer);
             ldapServer = newhost;