Untangle assignment and result check.
authorMichael Adam <obnox@samba.org>
Fri, 4 Jan 2008 20:56:57 +0000 (21:56 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 4 Jan 2008 21:09:36 +0000 (22:09 +0100)
Michael

source/libads/ldap.c

index 8a2b82a61d3ddb4ea4e8dfae51bb0e4ecc0766fa..ae8e1e4d4d01703b9c64d50964e85cfaadc7f4f2 100644 (file)
@@ -448,9 +448,9 @@ got_connection:
        
        /* Otherwise setup the TCP LDAP session */
 
-       if ( (ads->ldap.ld = ldap_open_with_timeout(ads->config.ldap_server_name, 
-               LDAP_PORT, lp_ldap_timeout())) == NULL )
-       {
+       ads->ldap.ld = ldap_open_with_timeout(ads->config.ldap_server_name,
+                                             LDAP_PORT, lp_ldap_timeout());
+       if (ads->ldap.ld == NULL) {
                return ADS_ERROR(LDAP_OPERATIONS_ERROR);
        }