assert expects int. (int)<nonnull ptr/long> can be 0. Use assert(arg!=0/NULL).

This commit is contained in:
Hallvard Furuseth 2006-04-01 23:52:42 +00:00
parent 581c1ff6c7
commit 6c772f2057
3 changed files with 7 additions and 7 deletions

View File

@ -164,7 +164,7 @@ static int indexer(
AttributeDescription *ad = NULL;
struct berval *keys;
assert( mask );
assert( mask != 0 );
rc = slap_bv2ad( atname, &ad, &text );

View File

@ -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);

View File

@ -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 )