mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-15 08:37:48 -05:00
more exploitation of efficient parsing
This commit is contained in:
parent
f2a80ff827
commit
cd8eb327d6
1 changed files with 2 additions and 4 deletions
|
|
@ -620,15 +620,13 @@ dnParent(
|
||||||
const char *dn,
|
const char *dn,
|
||||||
const char **pdn )
|
const char **pdn )
|
||||||
{
|
{
|
||||||
LDAPRDN *tmpRDN;
|
|
||||||
const char *p;
|
const char *p;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = ldap_str2rdn( dn, &tmpRDN, &p, LDAP_DN_FORMAT_LDAP );
|
rc = ldap_str2rdn( dn, NULL, &p, LDAP_DN_FORMAT_LDAP | LDAP_DN_SKIP );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
ldap_rdnfree( tmpRDN );
|
|
||||||
|
|
||||||
assert( DN_SEPARATOR( p[ 0 ] ) );
|
assert( DN_SEPARATOR( p[ 0 ] ) );
|
||||||
p++;
|
p++;
|
||||||
|
|
@ -715,7 +713,7 @@ dn_rdnlen(
|
||||||
struct berval *dn_in )
|
struct berval *dn_in )
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
char *p;
|
const char *p;
|
||||||
|
|
||||||
assert( dn_in );
|
assert( dn_in );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue