From: Kurt Zeilenga Date: Wed, 17 Jan 2001 02:48:55 +0000 (+0000) Subject: Move optimistic ret setting X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1589 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=abb0797358a050e08c0e0777eebd7fa660a36777;p=openldap Move optimistic ret setting --- diff --git a/servers/slapd/schema_check.c b/servers/slapd/schema_check.c index 6e6e797c31..34cd46f154 100644 --- a/servers/slapd/schema_check.c +++ b/servers/slapd/schema_check.c @@ -52,8 +52,6 @@ entry_schema_check( return LDAP_OBJECT_CLASS_VIOLATION; } - ret = LDAP_SUCCESS; - /* check that the entry has required attrs for each oc */ for ( i = 0; aoc->a_vals[i] != NULL; i++ ) { if ( (oc = oc_find( aoc->a_vals[i]->bv_val )) == NULL ) { @@ -99,6 +97,9 @@ entry_schema_check( return LDAP_SUCCESS; } + /* optimistic */ + ret = LDAP_SUCCESS; + /* check that each attr in the entry is allowed by some oc */ for ( a = e->e_attrs; a != NULL; a = a->a_next ) { ret = oc_check_allowed( a->a_desc->ad_type, aoc->a_vals );