mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Remove deprecated routines and a little lint.
This commit is contained in:
parent
278ccf828b
commit
309870fa9c
@ -635,41 +635,6 @@ dn_normalize( char *dn )
|
||||
return dn;
|
||||
}
|
||||
|
||||
/*
|
||||
* dn_parent - return the dn's parent, in-place
|
||||
* FIXME: should be replaced by dnParent()
|
||||
*/
|
||||
char *
|
||||
dn_parent(
|
||||
Backend *be,
|
||||
const char *dn )
|
||||
{
|
||||
struct berval bv, pdn;
|
||||
|
||||
if ( dn == NULL ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while ( dn[ 0 ] != '\0' && ASCII_SPACE( dn[ 0 ] ) ) {
|
||||
dn++;
|
||||
}
|
||||
|
||||
if ( dn[ 0 ] == '\0' ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bv.bv_val = (char *)dn;
|
||||
bv.bv_len = strlen(bv.bv_val);
|
||||
if ( be != NULL && be_issuffix( be, &bv ) ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ( dnParent( &bv, &pdn ) != LDAP_SUCCESS ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return pdn.bv_val;
|
||||
}
|
||||
#endif /* SLAP_DN_MIGRATION */
|
||||
|
||||
|
||||
@ -711,7 +676,6 @@ dn_rdnlen(
|
||||
Backend *be,
|
||||
struct berval *dn_in )
|
||||
{
|
||||
int rc;
|
||||
const char *p;
|
||||
|
||||
assert( dn_in );
|
||||
|
@ -406,11 +406,12 @@ LDAP_SLAPD_F (void) build_new_dn LDAP_P((
|
||||
|
||||
LDAP_SLAPD_F (int) dnParent LDAP_P(( struct berval *dn, struct berval *pdn ));
|
||||
|
||||
#define SLAP_DN_MIGRATION
|
||||
#ifdef HAVE_CYRUS_SASL
|
||||
#define SLAP_DN_MIGRATION 1
|
||||
#endif
|
||||
#ifdef SLAP_DN_MIGRATION
|
||||
/* These routines are deprecated!!! */
|
||||
LDAP_SLAPD_F (char *) dn_normalize LDAP_P(( char *dn ));
|
||||
LDAP_SLAPD_F (char *) dn_parent LDAP_P(( Backend *be, const char *dn ));
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user