Reverse arguments of is_object_subclass and reverse backwards calls

This commit is contained in:
Kurt Zeilenga 2002-02-09 23:55:37 +00:00
parent c1bf5ab485
commit 2b71d70f2f
3 changed files with 12 additions and 12 deletions

View File

@ -509,8 +509,8 @@ parse_acl(
}
}
if( is_object_subclass( b->a_group_oc,
slap_schema.si_oc_referral ) )
if( is_object_subclass( slap_schema.si_oc_referral,
b->a_group_oc ))
{
fprintf( stderr,
"%s: line %d: group objectclass \"%s\" "
@ -519,8 +519,8 @@ parse_acl(
acl_usage();
}
if( is_object_subclass( b->a_group_oc,
slap_schema.si_oc_alias ) )
if( is_object_subclass( slap_schema.si_oc_alias,
b->a_group_oc ))
{
fprintf( stderr,
"%s: line %d: group objectclass \"%s\" "

View File

@ -17,8 +17,8 @@
#include "ldap_pvt.h"
int is_object_subclass(
ObjectClass *sub,
ObjectClass *sup )
ObjectClass *sup,
ObjectClass *sub )
{
int i;
@ -26,19 +26,19 @@ int is_object_subclass(
#if 1
Debug( LDAP_DEBUG_TRACE, "is_object_subclass(%s,%s) %d\n",
sub->soc_oid, sup->soc_oid, sup == sub );
sup->soc_oid, sub->soc_oid, sup == sub );
#endif
if( sup == sub ) {
return 1;
}
if( sup->soc_sups == NULL ) {
if( sub->soc_sups == NULL ) {
return 0;
}
for( i=0; sup->soc_sups[i] != NULL; i++ ) {
if( is_object_subclass( sub, sup->soc_sups[i] ) ) {
for( i=0; sub->soc_sups[i] != NULL; i++ ) {
if( is_object_subclass( sup, sub->soc_sups[i] ) ) {
return 1;
}
}

View File

@ -619,8 +619,8 @@ LDAP_SLAPD_F (ObjectClass *) oc_find LDAP_P((
LDAP_SLAPD_F (ObjectClass *) oc_bvfind LDAP_P((
struct berval *ocname));
LDAP_SLAPD_F (int) is_object_subclass LDAP_P((
ObjectClass *sub,
ObjectClass *sup ));
ObjectClass *sup,
ObjectClass *sub ));
LDAP_SLAPD_F (int) is_entry_objectclass LDAP_P((
Entry *, ObjectClass *oc, int set_flags ));