]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:lib: Rearrange preprocessor directives to avoid structurally dead code (CID 242032)
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Fri, 6 Oct 2023 00:59:59 +0000 (13:59 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 13 Oct 2023 02:18:31 +0000 (02:18 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/lib/smbldap.c

index e1e01f76ea46e9dbe4aa2dc0576c23903a9a24cb..a95036e2f879670014e784a577fd319c7491601c 100644 (file)
@@ -670,7 +670,6 @@ static int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri)
                                ldap_err2string(rc)));
        }
 
-       return LDAP_SUCCESS;
 #else
 
        /* Parse the string manually */
@@ -719,7 +718,6 @@ static int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri)
 #endif /* LDAP_OPT_X_TLS */
                }
        }
-#endif /* HAVE_LDAP_INITIALIZE */
 
        /* now set connection timeout */
 #ifdef LDAP_X_OPT_CONNECT_TIMEOUT /* Netscape */
@@ -744,6 +742,7 @@ static int smb_ldap_setup_conn(LDAP **ldap_struct, const char *uri)
        }
 #endif
 
+#endif /* HAVE_LDAP_INITIALIZE */
        return LDAP_SUCCESS;
 }