From: Hallvard Furuseth Date: Sat, 1 Apr 2006 23:52:42 +0000 (+0000) Subject: assert expects int. (int) can be 0. Use assert(arg!=0/NULL). X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~54 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6c772f2057a5008f749061bef5ac1aabd7747321;p=openldap assert expects int. (int) can be 0. Use assert(arg!=0/NULL). --- diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index 6cdec8db7e..70622a89cc 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -164,7 +164,7 @@ static int indexer( AttributeDescription *ad = NULL; struct berval *keys; - assert( mask ); + assert( mask != 0 ); rc = slap_bv2ad( atname, &ad, &text ); diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index 52cb7f8550..854a49b5c1 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -1010,7 +1010,7 @@ uniqueMemberNormalize( struct berval out; int rc; - assert( SLAP_MR_IS_VALUE_OF_SYNTAX( usage )); + assert( SLAP_MR_IS_VALUE_OF_SYNTAX( usage ) != 0 ); ber_dupbv_x( &out, val, ctx ); if ( BER_BVISEMPTY( &out ) ) { @@ -1423,7 +1423,7 @@ UTF8StringNormalize( int flags; int i, wasspace; - assert( SLAP_MR_IS_VALUE_OF_SYNTAX( use )); + assert( SLAP_MR_IS_VALUE_OF_SYNTAX( use ) != 0 ); if( BER_BVISNULL( val ) ) { /* assume we're dealing with a syntax (e.g., UTF8String) @@ -1854,7 +1854,7 @@ telephoneNumberNormalize( { char *p, *q; - assert( SLAP_MR_IS_VALUE_OF_SYNTAX( usage )); + assert( SLAP_MR_IS_VALUE_OF_SYNTAX( usage ) != 0 ); /* validator should have refused an empty string */ assert( !BER_BVISEMPTY( val ) ); @@ -2106,7 +2106,7 @@ IA5StringNormalize( assert( !BER_BVISEMPTY( val ) ); - assert( SLAP_MR_IS_VALUE_OF_SYNTAX( use )); + assert( SLAP_MR_IS_VALUE_OF_SYNTAX( use ) != 0 ); p = val->bv_val; @@ -3275,7 +3275,7 @@ certificateExactNormalize( return serialNumberAndIssuerNormalize(0,NULL,NULL,val,normalized,ctx); } - assert( SLAP_MR_IS_VALUE_OF_ATTRIBUTE_SYNTAX(usage) ); + assert( SLAP_MR_IS_VALUE_OF_ATTRIBUTE_SYNTAX(usage) != 0 ); p = (unsigned char *)val->bv_val; xcert = d2i_X509( NULL, &p, val->bv_len); diff --git a/servers/slapd/value.c b/servers/slapd/value.c index 83aab3e42a..f76ab54036 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -229,7 +229,7 @@ int value_find_ex( return LDAP_INAPPROPRIATE_MATCHING; } - assert(SLAP_IS_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH( flags )); + assert( SLAP_IS_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH( flags ) != 0 ); if( !SLAP_IS_MR_ASSERTED_VALUE_NORMALIZED_MATCH( flags ) && mr->smr_normalize )