]> git.sur5r.net Git - openldap/commitdiff
Fix is_entry_objectclass flag comparisons (from Jason Townsend @ Apple)
authorHoward Chu <hyc@openldap.org>
Mon, 18 Nov 2002 03:56:54 +0000 (03:56 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 18 Nov 2002 03:56:54 +0000 (03:56 +0000)
servers/slapd/oc.c

index 4ce2b8b66abf4a76aefe072a2a3da248a9e0928f..8dbe1b29ead02a0b4c8252f0ee3883fc1a2426a9 100644 (file)
@@ -67,7 +67,7 @@ int is_entry_objectclass(
        }
 
        if( set_flags && ( e->e_ocflags & SLAP_OC__END )) {
-               return (e->e_ocflags & oc->soc_flags) ? 1 : 0;
+               return (e->e_ocflags & oc->soc_flags) == oc->soc_flags;
        }
 
        /*
@@ -105,7 +105,7 @@ int is_entry_objectclass(
        }
        e->e_ocflags |= SLAP_OC__END;   /* We've finished this */
 
-       return (e->e_ocflags & oc->soc_flags);
+       return (e->e_ocflags & oc->soc_flags) == oc->soc_flags;
 }