mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
slight optimization - use ldap_bv2dn()
This commit is contained in:
parent
f9b719f56e
commit
ba686c399b
1 changed files with 2 additions and 6 deletions
|
|
@ -4097,10 +4097,8 @@ int slapi_entry_rdn_values_present( const Slapi_Entry *e )
|
|||
LDAPDN dn;
|
||||
int rc;
|
||||
int i = 0, match = 0;
|
||||
char *dn_str;
|
||||
|
||||
dn_str = slapi_entry_get_dn( (Slapi_Entry *) e );
|
||||
rc = ldap_str2dn( dn_str, &dn, LDAP_DN_FORMAT_LDAPV3 );
|
||||
rc = ldap_bv2dn( &((Entry *)e)->e_name, &dn, LDAP_DN_FORMAT_LDAPV3 );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -4131,10 +4129,8 @@ int slapi_entry_add_rdn_values( Slapi_Entry *e )
|
|||
#ifdef LDAP_SLAPI
|
||||
LDAPDN dn;
|
||||
int i, rc;
|
||||
char *dn_str;
|
||||
|
||||
dn_str = slapi_entry_get_dn( e );
|
||||
rc = ldap_str2dn( dn_str, &dn, LDAP_DN_FORMAT_LDAPV3 );
|
||||
rc = ldap_bv2dn( &e->e_name, &dn, LDAP_DN_FORMAT_LDAPV3 );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue