]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapi/slapi_utils.c
allow to programmatically register new response code names
[openldap] / servers / slapd / slapi / slapi_utils.c
index d24be09b8205e285ae874b71cd69a6b5544f8b80..fafcde1b2faaa937fd09ef3dd1db55fcd4dfd085 100644 (file)
@@ -2153,7 +2153,6 @@ int slapi_attr_value_cmp( const Slapi_Attr *a, const struct berval *v1, const st
 int slapi_attr_value_find( const Slapi_Attr *a, struct berval *v )
 {
        int rc;
-       int ret;
 
        if ( a ->a_vals == NULL ) {
                return -1;
@@ -3234,6 +3233,8 @@ LDAP *slapi_ldap_init( char *ldaphost, int ldapport, int secure, int shared )
 
        if ( rc > 0 && rc < size ) {
                rc = ldap_initialize( &ld, url );
+       } else {
+               ld = NULL;
        }
 
        slapi_ch_free_string( &url );