LDAP: moved variable declaration to avoid compiler warn
authorDaniel Stenberg <daniel@haxx.se>
Sat, 18 Sep 2010 20:50:04 +0000 (22:50 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 18 Sep 2010 20:50:04 +0000 (22:50 +0200)
If built without HTTP or proxy support it would cause a compiler warning
due to the unused variable. I moved the declaration of it into the only
scope it is used.

lib/openldap.c

index 3382c77..4d5db4a 100644 (file)
@@ -178,7 +178,6 @@ static Sockbuf_IO ldapsb_tls;
 
 static CURLcode ldap_connect(struct connectdata *conn, bool *done)
 {
-  CURLcode result;
   ldapconninfo *li = conn->proto.generic;
   struct SessionHandle *data=conn->data;
   int rc, proto = LDAP_VERSION3;
@@ -205,6 +204,7 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done)
     /* for LDAP over HTTP proxy */
     struct HTTP http_proxy;
     ldapconninfo *li_save;
+    CURLcode result;
 
     /* BLOCKING */
     /* We want "seamless" LDAP operations through HTTP proxy tunnel */