From: Hallvard Furuseth Date: Wed, 22 Jan 2003 22:01:21 +0000 (+0000) Subject: Return 0 or 1 from is_entry_*(), to kill 'signed vs. unsigned' warnings. X-Git-Tag: NO_SLAP_OP_BLOCKS~534 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e384faf927ba6225e35e244ca0b801d697e0cc71;p=openldap Return 0 or 1 from is_entry_*(), to kill 'signed vs. unsigned' warnings. --- diff --git a/servers/slapd/oc.c b/servers/slapd/oc.c index 1bb799329e..e1564ab7fb 100644 --- a/servers/slapd/oc.c +++ b/servers/slapd/oc.c @@ -75,7 +75,7 @@ int is_entry_objectclass( if( set_flags && ( e->e_ocflags & SLAP_OC__END )) { /* flags are set, use them */ - return e->e_ocflags & oc->soc_flags & SLAP_OC__MASK; + return (e->e_ocflags & oc->soc_flags & SLAP_OC__MASK) != 0; } /* @@ -114,7 +114,7 @@ int is_entry_objectclass( /* mark flags as set */ e->e_ocflags |= SLAP_OC__END; - return e->e_ocflags & oc->soc_flags & SLAP_OC__MASK; + return (e->e_ocflags & oc->soc_flags & SLAP_OC__MASK) != 0; } diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index c1a999d017..d281fe4f32 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -679,20 +679,25 @@ LDAP_SLAPD_F (int) is_object_subclass LDAP_P(( LDAP_SLAPD_F (int) is_entry_objectclass LDAP_P(( Entry *, ObjectClass *oc, int set_flags )); #define is_entry_alias(e) \ - (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_ALIAS) : \ - is_entry_objectclass((e), slap_schema.si_oc_alias, 1)) + (((e)->e_ocflags & SLAP_OC__END) \ + ? (((e)->e_ocflags & SLAP_OC_ALIAS) != 0) \ + : is_entry_objectclass((e), slap_schema.si_oc_alias, 1)) #define is_entry_referral(e) \ - (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_REFERRAL) : \ - is_entry_objectclass((e), slap_schema.si_oc_referral, 1)) + (((e)->e_ocflags & SLAP_OC__END) \ + ? (((e)->e_ocflags & SLAP_OC_REFERRAL) != 0) \ + : is_entry_objectclass((e), slap_schema.si_oc_referral, 1)) #define is_entry_subentry(e) \ - (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_SUBENTRY) : \ - is_entry_objectclass((e), slap_schema.si_oc_subentry, 1)) + (((e)->e_ocflags & SLAP_OC__END) \ + ? (((e)->e_ocflags & SLAP_OC_SUBENTRY) != 0) \ + : is_entry_objectclass((e), slap_schema.si_oc_subentry, 1)) #define is_entry_collectiveAttributeSubentry(e) \ - (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_COLLECTIVEATTRIBUTESUBENTRY) : \ - is_entry_objectclass((e), slap_schema.si_oc_collectiveAttributeSubentry, 1)) + (((e)->e_ocflags & SLAP_OC__END) \ + ? (((e)->e_ocflags & SLAP_OC_COLLECTIVEATTRIBUTESUBENTRY) != 0) \ + : is_entry_objectclass((e), slap_schema.si_oc_collectiveAttributeSubentry, 1)) #define is_entry_dynamicObject(e) \ - (((e)->e_ocflags & SLAP_OC__END) ? ((e)->e_ocflags & SLAP_OC_DYNAMICOBJECT) : \ - is_entry_objectclass((e), slap_schema.si_oc_dynamicObject, 1)) + (((e)->e_ocflags & SLAP_OC__END) \ + ? (((e)->e_ocflags & SLAP_OC_DYNAMICOBJECT) != 0) \ + : is_entry_objectclass((e), slap_schema.si_oc_dynamicObject, 1)) LDAP_SLAPD_F (int) oc_schema_info( Entry *e );