return;
}
- assert( ber_int_memory_fns->bmf_free );
+ assert( ber_int_memory_fns->bmf_free != 0 );
(*ber_int_memory_fns->bmf_free)( p, ctx );
}
return SASL_OK;
}
#else /* !LDAP_DEBUG_R_SASL */
- assert( mutex );
+ assert( mutex != NULL );
#endif /* !LDAP_DEBUG_R_SASL */
return ldap_pvt_thread_mutex_lock( (ldap_pvt_thread_mutex_t *)mutex )
? SASL_FAIL : SASL_OK;
return SASL_OK;
}
#else /* !LDAP_DEBUG_R_SASL */
- assert( mutex );
+ assert( mutex != NULL );
#endif /* !LDAP_DEBUG_R_SASL */
return ldap_pvt_thread_mutex_unlock( (ldap_pvt_thread_mutex_t *)mutex )
? SASL_FAIL : SASL_OK;
return;
}
#else /* !LDAP_DEBUG_R_SASL */
- assert( mutex );
+ assert( mutex != NULL );
#endif /* !LDAP_DEBUG_R_SASL */
(void) ldap_pvt_thread_mutex_destroy( (ldap_pvt_thread_mutex_t *)mutex );
LDAP_FREE( mutex );
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
- assert( str );
+ assert( str != NULL );
e = ldap_int_error( ld->ld_errno );
Debug( LDAP_DEBUG_TRACE, "ldap_dn_normalize\n", 0, 0, 0 );
- assert( dnout );
+ assert( dnout != NULL );
*dnout = NULL;
{
LDAPAVA *ava;
- assert( attr );
- assert( val );
+ assert( attr != NULL );
+ assert( val != NULL );
ava = LDAP_MALLOCX( sizeof( LDAPAVA ) + attr->bv_len + 1, ctx );
void
ldapava_free( LDAPAVA *ava, void *ctx )
{
- assert( ava );
+ assert( ava != NULL );
#if 0
/* ava's private must be freed by caller
{
struct berval bv;
- assert( str );
+ assert( str != NULL );
bv.bv_len = strlen( str );
bv.bv_val = (char *) str;
char *str, *end;
struct berval bvtmp, *bv = &bvtmp;
- assert( bvin );
- assert( bvin->bv_val );
- assert( dn );
+ assert( bvin != NULL );
+ assert( bvin->bv_val != NULL );
+ assert( dn != NULL );
*bv = *bvin;
str = bv->bv_val;
{
struct berval bv;
- assert( str );
+ assert( str != NULL );
assert( str[ 0 ] != '\0' ); /* FIXME: is this required? */
bv.bv_len = strlen( str );
char *str;
ber_len_t stoplen;
- assert( bv );
- assert( bv->bv_len );
- assert( bv->bv_val );
+ assert( bv != NULL );
+ assert( bv->bv_len != 0 );
+ assert( bv->bv_val != NULL );
assert( rdn || flags & LDAP_DN_SKIP );
- assert( n );
+ assert( n != NULL );
str = bv->bv_val;
stoplen = bv->bv_len;
const char *p, *end, *startPos, *endPos = NULL;
ber_len_t len, escapes;
- assert( str );
- assert( val );
- assert( next );
+ assert( str != NULL );
+ assert( val != NULL );
+ assert( next != NULL );
*next = NULL;
end = str + stoplen;
const char *p, *startPos, *endPos = NULL;
ber_len_t len, escapes;
- assert( str );
- assert( val );
- assert( next );
+ assert( str != NULL );
+ assert( val != NULL );
+ assert( next != NULL );
*next = NULL;
const char *p, *startPos, *endPos = NULL;
ber_len_t len, escapes;
- assert( str );
- assert( val );
- assert( next );
+ assert( str != NULL );
+ assert( val != NULL );
+ assert( next != NULL );
*next = NULL;
ber_len_t len;
unsigned escapes = 0;
- assert( str );
- assert( val );
- assert( next );
+ assert( str != NULL );
+ assert( val != NULL );
+ assert( next != NULL );
*next = NULL;
{
char c1, c2;
- assert( str );
- assert( c );
+ assert( str != NULL );
+ assert( c != NULL );
c1 = str[ 0 ];
c2 = str[ 1 ];
ber_len_t len;
ber_len_t s, d;
- assert( str );
- assert( val );
- assert( next );
+ assert( str != NULL );
+ assert( val != NULL );
+ assert( next != NULL );
*next = NULL;
{
static const char hexdig[] = "0123456789ABCDEF";
- assert( val );
- assert( pair );
+ assert( val != NULL );
+ assert( pair != NULL );
/*
* we assume the string has enough room for the hex encoding
{
ber_len_t s, d;
- assert( val );
- assert( str );
+ assert( val != NULL );
+ assert( str != NULL );
if ( val->bv_len == 0 ) {
return( 0 );
int escaped_ascii_len = LDAP_DN_IS_PRETTY( flags ) ? 2 : 3;
#endif /* PRETTY_ESCAPE */
- assert( val );
- assert( len );
+ assert( val != NULL );
+ assert( len != NULL );
*len = 0;
if ( val->bv_len == 0 ) {
{
ber_len_t s, d, end;
- assert( val );
- assert( str );
- assert( len );
+ assert( val != NULL );
+ assert( str != NULL );
+ assert( len != NULL );
if ( val->bv_len == 0 ) {
*len = 0;
ber_len_t l;
char *p;
- assert( val );
- assert( len );
+ assert( val != NULL );
+ assert( len != NULL );
*len = 0;
if ( val->bv_len == 0 ) {
{
ber_len_t s, d, end;
- assert( val );
- assert( str );
- assert( len );
+ assert( val != NULL );
+ assert( str != NULL );
+ assert( len != NULL );
if ( val->bv_len == 0 ) {
*len = 0;
ber_len_t l;
char *p;
- assert( val );
- assert( len );
+ assert( val != NULL );
+ assert( len != NULL );
*len = 0;
if ( val->bv_len == 0 ) {
{
ber_len_t s, d;
- assert( val );
- assert( str );
- assert( len );
+ assert( val != NULL );
+ assert( str != NULL );
+ assert( len != NULL );
if ( val->bv_len == 0 ) {
*len = 0;
ber_len_t l;
char *p;
- assert( val );
- assert( len );
+ assert( val != NULL );
+ assert( len != NULL );
*len = 0;
if ( val->bv_len == 0 ) {
{
ber_len_t s, d;
- assert( val );
- assert( str );
- assert( len );
+ assert( val != NULL );
+ assert( str != NULL );
+ assert( len != NULL );
if ( val->bv_len == 0 ) {
*len = 0;
/* we are guaranteed there's enough memory in str */
/* sanity */
- assert( dn );
- assert( bv );
- assert( iRDN );
+ assert( dn != NULL );
+ assert( bv != NULL );
+ assert( iRDN != NULL );
assert( *iRDN >= 0 );
str = bv->bv_val + pos;
LDAPRDN rdn;
LDAPAVA *ava;
- assert( dn[ i ] );
+ assert( dn[ i ] != NULL );
rdn = dn[ i ];
- assert( rdn[ 0 ] );
+ assert( rdn[ 0 ] != NULL );
ava = rdn[ 0 ];
if ( !LDAP_DN_IS_RDN_DC( rdn ) ) {
int iAVA;
ber_len_t l = 0;
- assert( rdn );
- assert( len );
+ assert( rdn != NULL );
+ assert( len != NULL );
*len = 0;
int iAVA;
ber_len_t l = 0;
- assert( rdn );
- assert( len );
+ assert( rdn != NULL );
+ assert( len != NULL );
*len = 0;
struct berval bv;
int rc;
- assert( str );
+ assert( str != NULL );
if((flags & LDAP_DN_FORMAT_MASK) == LDAP_DN_FORMAT_LBER) {
return LDAP_PARAM_ERROR;
int rc, back;
ber_len_t l;
- assert( bv );
+ assert( bv != NULL );
bv->bv_len = 0;
bv->bv_val = NULL;
struct berval bv;
int rc;
- assert( str );
+ assert( str != NULL );
if((flags & LDAP_DN_FORMAT_MASK) == LDAP_DN_FORMAT_LBER) {
return LDAP_PARAM_ERROR;
int ( *sv2l ) ( struct berval *v, unsigned f, ber_len_t *l );
int ( *sv2s ) ( struct berval *v, char *s, unsigned f, ber_len_t *l );
- assert( bv );
+ assert( bv != NULL );
bv->bv_len = 0;
bv->bv_val = NULL;
struct berval Val;
- assert( bv );
+ assert( bv != NULL );
bv->bv_len = 0;
bv->bv_val = NULL;
assert( ld != NULL );
assert( LDAP_VALID( ld ) );
- assert( ctrl );
+ assert( ctrl != NULL );
/* Create a BerElement from the berval returned in the control. */
ber = ber_init(&ctrl->ldctl_value);
tmp = lm;
}
} else {
- assert(lm->lm_chain_tail);
- assert(lm->lm_chain_tail->lm_chain);
+ assert(lm->lm_chain_tail != NULL);
+ assert(lm->lm_chain_tail->lm_chain != NULL);
if ((lm->lm_chain_tail->lm_chain->lm_msgtype
== LDAP_RES_SEARCH_ENTRY) ||
(lm->lm_chain_tail->lm_chain->lm_msgtype
if ( all == LDAP_MSG_ONE && lm->lm_chain != NULL ) {
lm->lm_chain->lm_next = lm->lm_next;
lm->lm_chain->lm_chain_tail = ( lm->lm_chain_tail != lm ) ? lm->lm_chain_tail : lm->lm_chain;
- assert(lm->lm_chain->lm_chain_tail);
+ assert(lm->lm_chain->lm_chain_tail != NULL);
lm->lm_chain = NULL;
lm->lm_chain_tail = NULL;
}
assert(l->lm_chain_tail == l);
l->lm_chain = newmsg;
} else {
- assert(l->lm_chain_tail);
- assert(l->lm_chain_tail->lm_chain);
+ assert(l->lm_chain_tail != NULL);
+ assert(l->lm_chain_tail->lm_chain != NULL);
if ((l->lm_chain_tail->lm_chain->lm_msgtype
== LDAP_RES_SEARCH_ENTRY) ||
(l->lm_chain_tail->lm_chain->lm_msgtype
{
char *s = NULL;
- assert( bv );
+ assert( bv != NULL );
/* to upper */
if ( str ) {
{
char *s = NULL;
- assert( bv );
+ assert( bv != NULL );
/* to lower */
if ( str ) {
int ldap_pvt_url_scheme2proto( const char *scheme )
{
- assert( scheme );
+ assert( scheme != NULL );
if( scheme == NULL ) {
return -1;
int ldap_pvt_url_scheme_port( const char *scheme, int port )
{
- assert( scheme );
+ assert( scheme != NULL );
if( port ) return port;
if( scheme == NULL ) return port;
int
ldap_pvt_url_scheme2tls( const char *scheme )
{
- assert( scheme );
+ assert( scheme != NULL );
if( scheme == NULL ) {
return -1;
return LDAP_URL_ERR_BADSCHEME;
}
- assert( scheme );
+ assert( scheme != NULL );
/* make working copy of the remainder of the URL */
url = LDAP_STRDUP( url_tmp );
int i;
ber_len_t len;
- assert( must_b64_encode );
- assert( name );
- assert( oid );
+ assert( must_b64_encode != NULL );
+ assert( name != NULL );
+ assert( oid != NULL );
len = strlen( name );
{
int i;
- assert( must_b64_encode );
+ assert( must_b64_encode != NULL );
if ( must_b64_encode == default_must_b64_encode ) {
return;
int i;
struct berval bv;
- assert( must_b64_encode );
- assert( s );
+ assert( must_b64_encode != NULL );
+ assert( s != NULL );
ber_str2bv( s, 0, 0, &bv );
{
struct rewrite_context *context = (struct rewrite_context *)tmp;
- assert( tmp );
+ assert( tmp != NULL );
rewrite_context_destroy( &context );
}
struct rewrite_context *context;
struct rewrite_rule *r;
- assert( pcontext );
- assert( *pcontext );
+ assert( pcontext != NULL );
+ assert( *pcontext != NULL );
context = *pcontext;
- assert( context->lc_rule );
+ assert( context->lc_rule != NULL );
for ( r = context->lc_rule->lr_next; r; ) {
struct rewrite_rule *cr = r;
free( context->lc_rule );
context->lc_rule = NULL;
- assert( context->lc_name );
+ assert( context->lc_name != NULL );
free( context->lc_name );
context->lc_name = NULL;
{
struct ldap_map_data *data;
- assert( pmap );
- assert( *pmap );
+ assert( pmap != NULL );
+ assert( *pmap != NULL );
data = ( struct ldap_map_data * )(*pmap)->lb_private;
{
struct rewrite_builtin_map *map = ( struct rewrite_builtin_map * )tmp;
- assert( map );
+ assert( map != NULL );
switch ( map->lb_type ) {
case REWRITE_BUILTIN_MAP_LDAP:
{
struct rewrite_map *map;
- assert( pmap );
- assert( *pmap );
+ assert( pmap != NULL );
+ assert( *pmap != NULL );
map = *pmap;
{
struct rewrite_action *action;
- assert( paction );
- assert( *paction );
+ assert( paction != NULL );
+ assert( *paction != NULL );
action = *paction;
struct rewrite_rule *rule;
struct rewrite_action *action;
- assert( prule );
- assert( *prule );
+ assert( prule != NULL );
+ assert( *prule != NULL );
rule = *prule;
struct rewrite_session *session
)
{
- assert( session );
+ assert( session != NULL );
ldap_pvt_thread_mutex_unlock( &session->ls_mutex );
}
int n;
struct rewrite_subst *subst;
- assert( psubst );
- assert( *psubst );
+ assert( psubst != NULL );
+ assert( *psubst != NULL );
subst = *psubst;
{
struct rewrite_map *map;
- assert( pmap );
- assert( *pmap );
+ assert( pmap != NULL );
+ assert( *pmap != NULL );
map = *pmap;
AccessControlState *state,
slap_mask_t *maskp )
{
- assert( maskp );
+ assert( maskp != NULL );
ACL_PRIV_SET( *maskp, ACL_ACCESS2PRIV( access ) );
AttributeDescription *ad = ( AttributeDescription * )priv;
char *ptr;
- assert( ad );
+ assert( ad != NULL );
bv->bv_val = ch_malloc( STRLENOF(" aci=") + ad->ad_cname.bv_len + 1 );
ptr = lutil_strcopy( bv->bv_val, " aci=" );
int
at_start( AttributeType **at )
{
- assert( at );
+ assert( at != NULL );
*at = LDAP_STAILQ_FIRST(&attr_list);
int
at_next( AttributeType **at )
{
- assert( at );
+ assert( at != NULL );
#if 1 /* pedantic check */
{
}
}
- assert( tmp );
+ assert( tmp != NULL );
}
#endif
BER_BVZERO( &tmp->a_vals[i] );
/* a_nvals must be non null; it may be equal to a_vals */
- assert( a->a_nvals );
+ assert( a->a_nvals != NULL );
if ( a->a_nvals != a->a_vals ) {
tmp->a_nvals = ch_malloc( (i + 1) * sizeof(struct berval) );
EntryInfo *ei = BEI(e);
int rc;
- assert( e->e_private );
+ assert( e->e_private != NULL );
/* Set this early, warn off any queriers */
ei->bei_state |= CACHE_ENTRY_DELETED;
DB *db;
struct berval *keys;
- assert( mask );
+ assert( mask != 0 );
rc = bdb_db_cache( op->o_bd, atname->bv_val, &db );
{
int rc;
- assert( e );
+ assert( e != NULL );
/* NOTE: this should never happen, but it actually happens
* when using back-relay; until we find a better way to
{
Attribute **ap;
- assert( rs->sr_entry );
+ assert( rs->sr_entry != NULL );
for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next )
/* just count */ ;
rc = bdb_hasSubordinates( op, rs->sr_entry, &hasSubordinates );
if ( rc == LDAP_SUCCESS ) {
*ap = slap_operational_hasSubordinate( hasSubordinates == LDAP_COMPARE_TRUE );
- assert( *ap );
+ assert( *ap != NULL );
ap = &(*ap)->a_next;
}
{
int rc = 0;
- assert( f );
+ assert( f != NULL );
if( cur > *max ) *max = cur;
assert( be != NULL );
assert( slapMode & SLAP_TOOL_MODE );
- assert( text );
- assert( text->bv_val );
+ assert( text != NULL );
+ assert( text->bv_val != NULL );
assert( text->bv_val[0] == '\0' ); /* overconservative? */
Debug( LDAP_DEBUG_TRACE, "=> " LDAP_XSTRING(bdb_tool_entry_put)
assert( be != NULL );
assert( slapMode & SLAP_TOOL_MODE );
- assert( text );
- assert( text->bv_val );
+ assert( text != NULL );
+ assert( text->bv_val != NULL );
assert( text->bv_val[0] == '\0' ); /* overconservative? */
assert ( e->e_id != NOID );
* added by back-ldap, so it's the only one we explicitly
* free */
if ( ctrls && ctrls != op->o_ctrls ) {
- assert( ctrls[ 0 ] );
+ assert( ctrls[ 0 ] != NULL );
if ( !BER_BVISNULL( &ctrls[ 0 ]->ldctl_value ) ) {
free( ctrls[ 0 ]->ldctl_value.bv_val );
* added by the chain overlay, so it's the only one we explicitly
* free */
if ( op->o_ctrls != oldctrls ) {
- assert( op->o_ctrls );
- assert( op->o_ctrls[ 0 ] );
+ assert( op->o_ctrls != NULL );
+ assert( op->o_ctrls[ 0 ] != NULL );
free( op->o_ctrls );
int last;
/* safe assumptions ... */
- assert( ent );
+ assert( ent != NULL );
BER_BVZERO( &ent->e_bv );
if ( ber_scanf( &ber, "{m{", bdn ) == LBER_ERROR ) {
BerVarray dnlist,
struct berval *dn )
{
- assert( dnlist );
+ assert( dnlist != NULL );
for( ; dnlist->bv_val != NULL; dnlist++ ) {
if( dnIsSuffix( dnlist, dn ) ) {
void
cache_entry_commit( Entry *e )
{
- assert( e );
- assert( e->e_private );
+ assert( e != NULL );
+ assert( e->e_private != NULL );
assert( LEI(e)->lei_state == CACHE_ENTRY_CREATING );
/* assert( LEI(e)->lei_refcnt == 1 ); */
static int
cache_entry_private_destroy( Entry*e )
{
- assert( e->e_private );
+ assert( e->e_private != NULL );
free( e->e_private );
e->e_private = NULL;
/* set cache mutex */
ldap_pvt_thread_mutex_lock( &cache->c_mutex );
- assert( e->e_private );
+ assert( e->e_private != NULL );
id = e->e_id;
refcnt = --LEI(e)->lei_refcnt;
/* set cache mutex */
ldap_pvt_thread_mutex_lock( &cache->c_mutex );
- assert( e->e_private );
+ assert( e->e_private != NULL );
if ( avl_insert( &cache->c_dntree, (caddr_t) e,
entry_dn_cmp, avl_dup_error ) != 0 )
* we do not need to lock the entry if we only
* check the state, refcnt, LRU, and id.
*/
- assert( ep->e_private );
+ assert( ep->e_private != NULL );
/* save id */
id = ep->e_id;
count++;
- assert( ep->e_private );
+ assert( ep->e_private != NULL );
ep_id = ep->e_id;
state = LEI(ep)->lei_state;
/* set cache mutex */
ldap_pvt_thread_mutex_lock( &cache->c_mutex );
- assert( e->e_private );
+ assert( e->e_private != NULL );
Debug( LDAP_DEBUG_TRACE, "====> cache_delete_entry( %ld )\n",
e->e_id, 0, 0 );
Debug( LDAP_DEBUG_TRACE, "=> dn2id( \"%s\" )\n", dn->bv_val, 0, 0 );
- assert( idp );
+ assert( idp != NULL );
/* first check the cache */
*idp = cache_find_entry_ndn2id( be, &li->li_cache, dn );
{
Attribute **ap;
- assert( rs->sr_entry );
+ assert( rs->sr_entry != NULL );
for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next )
/* just count */ ;
hs = has_children( op->o_bd, rs->sr_entry );
*ap = slap_operational_hasSubordinate( hs );
- assert( *ap );
+ assert( *ap != NULL );
ap = &(*ap)->a_next;
}
assert( slapMode & SLAP_TOOL_MODE );
assert( id2entry != NULL );
- assert( text );
- assert( text->bv_val );
+ assert( text != NULL );
+ assert( text->bv_val != NULL );
assert( text->bv_val[0] == '\0' ); /* overconservative? */
if ( next_id_get( be, &id ) || id == NOID ) {
time_t curr_time;
int target = META_TARGET_NONE;
- assert( cache );
- assert( ndn );
+ assert( cache != NULL );
+ assert( ndn != NULL );
tmp_entry.dn = *ndn;
ldap_pvt_thread_mutex_lock( &cache->mutex );
time_t curr_time = 0L;
int err = 0;
- assert( cache );
- assert( ndn );
+ assert( cache != NULL );
+ assert( ndn != NULL );
/*
* if cache->ttl < 0, cache never expires;
metadncacheentry_t *entry,
tmp_entry;
- assert( cache );
- assert( ndn );
+ assert( cache != NULL );
+ assert( ndn != NULL );
tmp_entry.dn = *ndn;
{
struct ldapmapping *mapping;
- assert( m );
+ assert( m != NULL );
*m = NULL;
Avlnode *tree;
struct ldapmapping fmapping;
- assert( m );
+ assert( m != NULL );
if ( remap == BACKLDAP_REMAP ) {
tree = map->remap;
{
int i, last;
- assert( dc );
- assert( a_vals );
+ assert( dc != NULL );
+ assert( a_vals != NULL );
for ( last = 0; !BER_BVISNULL( &a_vals[ last ] ); last++ )
;
int i, src, dst;
struct berval pretty = {0,NULL}, *dn = odn;
- assert( res );
+ assert( res != NULL );
if ( dn == NULL ) {
res->bv_val = NULL;
current_bv = BER_BVC( "cn=current" );
struct berval rdn;
- assert( mi );
- assert( e );
+ assert( mi != NULL );
+ assert( e != NULL );
dnRdn( &e->e_nname, &rdn );
break;
}
}
- assert( on2 );
+ assert( on2 != NULL );
snprintf( buf, sizeof( buf ),
"cn=Overlay %d,%s",
break;
}
}
- assert( on2 );
+ assert( on2 != NULL );
snprintf( buf, sizeof( buf ),
"dn: cn=Overlay %d,cn=Database %d,%s\n"
/* FIXME: this should only be possible
* if be_monitor is already initialized */
- assert( be_monitor );
+ assert( be_monitor != NULL );
if ( ms->mss_open && ( *ms->mss_open )( be_monitor, ms ) ) {
return -1;
#endif
static char tmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
- assert( be_monitor );
+ assert( be_monitor != NULL );
if ( be != be_monitor ) {
be_monitor = be;
}
ep = &mp->mp_next;
}
- assert( be );
+ assert( be != NULL );
be->be_private = mi;
Attribute *a;
static struct berval bv_ops = BER_BVC( "cn=operations" );
- assert( mi );
- assert( e );
+ assert( mi != NULL );
+ assert( e != NULL );
dnRdn( &e->e_nname, &rdn );
{
Attribute **ap;
- assert( rs->sr_entry );
+ assert( rs->sr_entry != NULL );
for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next )
/* just count */ ;
mp = ( monitor_entry_t * )rs->sr_entry->e_private;
- assert( mp );
+ assert( mp != NULL );
hs = MONITOR_HAS_CHILDREN( mp );
*ap = slap_operational_hasSubordinate( hs );
- assert( *ap );
+ assert( *ap != NULL );
ap = &(*ap)->a_next;
}
snprintf( buf, sizeof( buf ), "%ld", num );
a = attr_find( e->e_attrs, mi->mi_ad_monitorCounter );
- assert( a );
+ assert( a != NULL );
len = strlen( buf );
if ( len > a->a_vals[ 0 ].bv_len ) {
a->a_vals[ 0 ].bv_val = ber_memrealloc( a->a_vals[ 0 ].bv_val, len + 1 );
Attribute *a;
int i;
- assert( mi );
- assert( e );
+ assert( mi != NULL );
+ assert( e != NULL );
dnRdn( &e->e_nname, &nrdn );
ldap_pvt_thread_mutex_unlock(&slap_counters.sc_sent_mutex);
a = attr_find( e->e_attrs, mi->mi_ad_monitorCounter );
- assert( a );
+ assert( a != NULL );
/* NOTE: no minus sign is allowed in the counters... */
UI2BV( &a->a_vals[ 0 ], n );
static struct berval bv_current = BER_BVC( "cn=current" );
struct berval rdn;
- assert( mi );
- assert( e );
+ assert( mi != NULL );
+ assert( e != NULL );
dnRdn( &e->e_nname, &rdn );
ri->ri_bd = select_backend( &ri->ri_realsuffix, 0, 1 );
/* must be there: it was during config! */
- assert( ri->ri_bd );
+ assert( ri->ri_bd != NULL );
/* inherit controls */
AC_MEMCPY( be->be_ctrls, ri->ri_bd->be_ctrls, sizeof( be->be_ctrls ) );
SQLHSTMT asth = SQL_NULL_HSTMT;
BACKSQL_ROW_NTS row;
- assert( at );
+ assert( at != NULL );
if ( at->bam_delete_proc == NULL ) {
Debug( LDAP_DEBUG_TRACE,
" backsql_modify_delete_all_values(): "
{
backsql_api *ba;
- assert( bi );
- assert( name );
+ assert( bi != NULL );
+ assert( name != NULL );
for ( ba = backsqlapi; ba; ba = ba->ba_next ) {
if ( strcasecmp( name, ba->ba_name ) == 0 ) {
{
backsql_api *ba;
- assert( bi );
+ assert( bi != NULL );
ba = bi->sql_api;
{
backsql_api *ba2;
- assert( ba );
+ assert( ba != NULL );
assert( ba->ba_private == NULL );
if ( ba->ba_name == NULL ) {
backsql_info *bi = (backsql_info *)be->be_private;
Debug( LDAP_DEBUG_TRACE, "==>backsql_db_config()\n", 0, 0, 0 );
- assert( bi );
+ assert( bi != NULL );
if ( !strcasecmp( argv[ 0 ], "dbhost" ) ) {
if ( argc < 2 ) {
int rc = 0, lineno = 0, lmax = 0;
char *buf = NULL;
- assert( fname );
+ assert( fname != NULL );
fp = ldif_open( fname, "r" );
if ( fp == NULL ) {
struct berval bv = BER_BVNULL;
const char *text = NULL;
- assert( ava );
+ assert( ava != NULL );
rc = slap_bv2ad( &ava->la_attr, &ad, &text );
if ( rc != LDAP_SUCCESS ) {
{
backsql_entryID *next;
- assert( id );
+ assert( id != NULL );
next = id->eid_next;
/* begin TimesTen */
Debug( LDAP_DEBUG_TRACE, " backsql_dn2id(\"%s\"): id_query \"%s\"\n",
ndn->bv_val, bi->sql_id_query, 0 );
- assert( bi->sql_id_query );
+ assert( bi->sql_id_query != NULL );
rc = backsql_Prepare( dbh, &sth, bi->sql_id_query, 0 );
if ( rc != SQL_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
/* begin TimesTen */
Debug(LDAP_DEBUG_TRACE, "children id query \"%s\"\n",
bi->sql_has_children_query, 0, 0);
- assert( bi->sql_has_children_query );
+ assert( bi->sql_has_children_query != NULL );
rc = backsql_Prepare( dbh, &sth, bi->sql_has_children_query, 0 );
if ( rc != SQL_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
slap_syntax_transform_func *pretty = NULL;
#endif /* BACKSQL_PRETTY_VALIDATE */
- assert( at );
- assert( bsi );
+ assert( at != NULL );
+ assert( bsi != NULL );
#ifdef BACKSQL_ARBITRARY_KEY
Debug( LDAP_DEBUG_TRACE, "==>backsql_get_attr_vals(): "
Debug( LDAP_DEBUG_TRACE, "==>backsql_id2entry()\n", 0, 0, 0 );
- assert( bsi->bsi_e );
+ assert( bsi->bsi_e != NULL );
memset( bsi->bsi_e, 0, sizeof( Entry ) );
/* normalize filter values only if necessary */
bi->sql_caseIgnoreMatch = mr_find( "caseIgnoreMatch" );
- assert( bi->sql_caseIgnoreMatch );
+ assert( bi->sql_caseIgnoreMatch != NULL );
bi->sql_telephoneNumberMatch = mr_find( "telephoneNumberMatch" );
- assert( bi->sql_telephoneNumberMatch );
+ assert( bi->sql_telephoneNumberMatch != NULL );
if ( bi->sql_dbuser == NULL ) {
Debug( LDAP_DEBUG_TRACE, "backsql_db_open(): "
#ifdef BACKSQL_SYNCPROV
if ( op->o_sync && op->o_tag == LDAP_REQ_SEARCH ) {
- assert( op->o_private );
+ assert( op->o_private != NULL );
entryCSN = *((struct berval *)op->o_private);
case LDAP_COMPARE_TRUE:
case LDAP_COMPARE_FALSE:
*ap = slap_operational_hasSubordinate( rc == LDAP_COMPARE_TRUE );
- assert( *ap );
+ assert( *ap != NULL );
ap = &(*ap)->a_next;
rc = 0;
break;
struct supad2at_t va = { 0 };
int rc;
- assert( objclass );
- assert( supad );
- assert( pret );
+ assert( objclass != NULL );
+ assert( supad != NULL );
+ assert( pret != NULL );
*pret = NULL;
int getentry = BACKSQL_IS_GET_ENTRY( flags );
int gotit = 0;
- assert( op->o_bd->be_private );
+ assert( op->o_bd->be_private != NULL );
rc = backsql_dn2id( op, rs, dbh, nbase, &bsi->bsi_base_id,
matched, 1 );
backsql_info *bi = (backsql_info *)bsi->bsi_op->o_bd->be_private;
int rc;
- assert( query );
+ assert( query != NULL );
BER_BVZERO( query );
bsi->bsi_use_subtree_shortcut = 0;
int i;
BackendDB *bd = bsi->bsi_op->o_bd;
- assert( bd->be_nsuffix );
+ assert( bd->be_nsuffix != NULL );
for ( i = 0; !BER_BVISNULL( &bd->be_nsuffix[ i ] ); i++ )
{
backsql_db_conn *dbc;
int rc;
- assert( pdbc );
+ assert( pdbc != NULL );
*pdbc = NULL;
Debug( LDAP_DEBUG_TRACE, "==>backsql_open_db_conn()\n", 0, 0, 0 );
Debug( LDAP_DEBUG_TRACE, "==>backsql_get_db_conn()\n", 0, 0, 0 );
- assert( dbh );
+ assert( dbh != NULL );
*dbh = SQL_NULL_HDBC;
tmp.ldap_cid = op->o_connid;
ber_len_t cdlen, cslen, grow;
char *cstr;
- assert( dest );
+ assert( dest != NULL );
assert( dest->bb_val.bv_val == NULL
|| dest->bb_val.bv_len == strlen( dest->bb_val.bv_val ) );
va_list strs;
ber_len_t cdlen;
- assert( dest );
- assert( fmt );
+ assert( dest != NULL );
+ assert( fmt != NULL );
assert( dest->bb_len == 0 || dest->bb_len > dest->bb_val.bv_len );
assert( dest->bb_val.bv_val == NULL
|| dest->bb_val.bv_len == strlen( dest->bb_val.bv_val ) );
#endif /* BACKSQL_TRACE */
}
- assert( cstr );
+ assert( cstr != NULL );
AC_MEMCPY( dest->bb_val.bv_val + cdlen, cstr, cslen + 1 );
cdlen += cslen;
char *s, *q;
struct berbuf res = BB_NULL;
- assert( p );
- assert( *p );
+ assert( p != NULL );
+ assert( *p != NULL );
s = *p;
while ( **p && **p != ',' ) {
#define SPLIT_CHAR '?'
- assert( _pattern );
- assert( split_pattern );
+ assert( _pattern != NULL );
+ assert( split_pattern != NULL );
pattern = ch_strdup( _pattern );
int i;
struct berbuf bb = BB_NULL;
- assert( res );
+ assert( res != NULL );
for ( i = 0; values[i].bv_val; i++ ) {
if ( split_pattern[i].bv_val == NULL ) {
/* entryUUID is generated as "%08x-%04x-%04x-0000-eaddrXXX"
* with eid_oc_id as %08x and hi and lo eid_id as %04x-%04x */
- assert( bi );
- assert( id );
- assert( entryUUID );
+ assert( bi != NULL );
+ assert( id != NULL );
+ assert( entryUUID != NULL );
#ifdef BACKSQL_ARBITRARY_KEY
snprintf( uuidbuf, sizeof( uuidbuf ),
}
for( bi=slap_binfo; bi->bi_type != NULL; bi++,nBackendInfo++ ) {
- assert( bi->bi_init );
+ assert( bi->bi_init != 0 );
rc = bi->bi_init( bi );
{
int rc = 0;
- assert( be );
+ assert( be != NULL );
be->be_pending_csn_list = (struct be_pcl *)
ch_calloc( 1, sizeof( struct be_pcl ));
Backend *be = op->o_bd;
/* pedantic */
- assert( op );
- assert( op->o_conn );
- assert( edn );
+ assert( op != NULL );
+ assert( op->o_conn != NULL );
+ assert( edn != NULL );
assert( access > ACL_NONE );
op->o_bd = select_backend( edn, 0, 0 );
{
slap_overinst *on = overlays;
- assert( over_type );
+ assert( over_type != NULL );
for ( ; on; on = on->on_next ) {
if ( strcmp( on->on_bi.bi_type, over_type ) == 0 ) {
{
slap_overinst *on;
- assert( be );
+ assert( be != NULL );
if ( !overlay_is_over( be ) ) {
return 0;
break;
case 'd':
- assert( tab->aux );
+ assert( tab->aux != NULL );
iptr = (int *)((char *)bc + tab->off);
rc = 1;
break;
case 'd':
- assert( tab->aux );
+ assert( tab->aux != NULL );
iptr = (int *)((char *)bc + tab->off);
for ( i = 0; !BER_BVISNULL( &tab->aux[i].word ); i++ ) {
cir->cir_name.bv_len = strlen( scr->scr_oid );
cir->cir_cr = scr;
- assert( cir->cir_name.bv_val );
- assert( cir->cir_cr );
+ assert( cir->cir_name.bv_val != NULL );
+ assert( cir->cir_cr != NULL );
if ( avl_insert( &cr_index, (caddr_t) cir,
cr_index_cmp, avl_dup_error ) )
cir->cir_name.bv_len = strlen( *names );
cir->cir_cr = scr;
- assert( cir->cir_name.bv_val );
- assert( cir->cir_cr );
+ assert( cir->cir_name.bv_val != NULL );
+ assert( cir->cir_cr != NULL );
if ( avl_insert( &cr_index, (caddr_t) cir,
cr_index_cmp, avl_dup_error ) )
{
int i;
- assert( exts );
- assert( perms );
- assert( crit );
+ assert( exts != NULL );
+ assert( perms != NULL );
+ assert( crit != NULL );
*crit = 0;
for ( i = 0; exts[ i ]; i++ ) {
int iAVA;
int rc;
- assert( rdn );
+ assert( rdn != NULL );
for ( iAVA = 0; rdn[ iAVA ]; iAVA++ ) {
LDAPAVA *ava = rdn[ iAVA ];
AttributeDescription *ad;
slap_syntax_validate_func *validate = NULL;
- assert( ava );
+ assert( ava != NULL );
if ( ( ad = AVA_PRIVATE( ava ) ) == NULL ) {
const char *text = NULL;
int iRDN;
int rc;
- assert( dn );
+ assert( dn != NULL );
for ( iRDN = 0; dn[ iRDN ]; iRDN++ ) {
LDAPRDN rdn = dn[ iRDN ];
int iAVA;
- assert( rdn );
+ assert( rdn != NULL );
for ( iAVA = 0; rdn[ iAVA ]; iAVA++ ) {
LDAPAVA *ava = rdn[ iAVA ];
AttributeDescription *ad;
slap_syntax_validate_func *validate = NULL;
- assert( ava );
+ assert( ava != NULL );
if ( ( ad = AVA_PRIVATE( ava ) ) == NULL ) {
const char *text = NULL;
int rc;
LDAPDN dn = NULL;
- assert( in );
+ assert( in != NULL );
if ( in->bv_len == 0 ) {
return LDAP_SUCCESS;
LDAPRDN rdn;
char* p;
- assert( in );
+ assert( in != NULL );
if ( in->bv_len == 0 ) {
return LDAP_SUCCESS;
int i;
LDAPAVA *ava_in = rdn[ iAVA ];
- assert( rdn );
- assert( ava_in );
+ assert( rdn != NULL );
+ assert( ava_in != NULL );
for ( i = 0; i < iAVA; i++ ) {
LDAPAVA *ava = rdn[ i ];
int a, j;
- assert( ava );
+ assert( ava != NULL );
a = strcmp( ava_in->la_attr.bv_val, ava->la_attr.bv_val );
struct berval bv = BER_BVNULL;
int do_sort = 0;
- assert( ava );
+ assert( ava != NULL );
if ( ( ad = AVA_PRIVATE( ava ) ) == NULL ) {
const char *text = NULL;
int iRDN;
int rc;
- assert( dn );
+ assert( dn != NULL );
for ( iRDN = 0; dn[ iRDN ]; iRDN++ ) {
LDAPRDN rdn = dn[ iRDN ];
int iAVA;
- assert( rdn );
+ assert( rdn != NULL );
for ( iAVA = 0; rdn[ iAVA ]; iAVA++ ) {
LDAPAVA *ava = rdn[ iAVA ];
struct berval bv = BER_BVNULL;
int do_sort = 0;
- assert( ava );
+ assert( ava != NULL );
if ( ( ad = AVA_PRIVATE( ava ) ) == NULL ) {
const char *text = NULL;
struct berval *out,
void *ctx)
{
- assert( val );
- assert( out );
+ assert( val != NULL );
+ assert( out != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> dnNormalize: <%s>\n", val->bv_val, 0, 0 );
struct berval *out,
void *ctx)
{
- assert( val );
- assert( out );
+ assert( val != NULL );
+ assert( out != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> dnNormalize: <%s>\n", val->bv_val, 0, 0 );
if ( val->bv_len != 0 ) {
struct berval *out,
void *ctx)
{
- assert( val );
- assert( out );
+ assert( val != NULL );
+ assert( out != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> dnPretty: <%s>\n", val->bv_val, 0, 0 );
struct berval *out,
void *ctx)
{
- assert( val );
- assert( out );
+ assert( val != NULL );
+ assert( out != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> dnPretty: <%s>\n", val->bv_val, 0, 0 );
int flags,
void *ctx )
{
- assert( val );
- assert( dn );
+ assert( val != NULL );
+ assert( dn != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> dn%sDN: <%s>\n",
flags == SLAP_LDAPDN_PRETTY ? "Pretty" : "Normal",
{
Debug( LDAP_DEBUG_TRACE, ">>> dnPrettyNormal: <%s>\n", val->bv_val, 0, 0 );
- assert( val );
- assert( pretty );
- assert( normal );
+ assert( val != NULL );
+ assert( pretty != NULL );
+ assert( normal != NULL );
if ( val->bv_len == 0 ) {
ber_dupbv_x( pretty, val, ctx );
int match;
struct berval *asserted = (struct berval *) assertedValue;
- assert( matchp );
- assert( value );
- assert( assertedValue );
+ assert( matchp != NULL );
+ assert( value != NULL );
+ assert( assertedValue != NULL );
assert( !BER_BVISNULL( value ) );
assert( !BER_BVISNULL( asserted ) );
int match;
struct berval *asserted = (struct berval *) assertedValue;
- assert( matchp );
- assert( value );
- assert( assertedValue );
+ assert( matchp != NULL );
+ assert( value != NULL );
+ assert( assertedValue != NULL );
assert( !BER_BVISNULL( value ) );
assert( !BER_BVISNULL( asserted ) );
int match;
struct berval *asserted = (struct berval *) assertedValue;
- assert( matchp );
- assert( value );
- assert( assertedValue );
+ assert( matchp != NULL );
+ assert( value != NULL );
+ assert( assertedValue != NULL );
match = value->bv_len - asserted->bv_len;
const char *p;
int rc;
- assert( dn );
- assert( rdn );
+ assert( dn != NULL );
+ assert( rdn != NULL );
if( dn->bv_len == 0 ) {
return LDAP_OTHER;
{
const char *p;
- assert( dn_in );
+ assert( dn_in != NULL );
if ( dn_in == NULL ) {
return 0;
{
int d = dn->bv_len - suffix->bv_len;
- assert( dn );
- assert( suffix );
+ assert( dn != NULL );
+ assert( suffix != NULL );
/* empty suffix matches any dn */
if ( suffix->bv_len == 0 ) {
void *ctx )
{
ber_len_t i;
- assert( in );
- assert( out );
+ assert( in != NULL );
+ assert( out != NULL );
i = in->bv_len * 3 + 1;
out->bv_val = ctx ? slap_sl_malloc( i, ctx ) : ch_malloc( i );
int ret;
const char *text;
- assert( ad );
+ assert( ad != NULL );
if ( mra->ma_desc ) {
/* have a mra type? check for subtype */
}
mr = slap_schema.si_ad_entryDN->ad_type->sat_equality;
- assert( mr );
+ assert( mr != NULL );
rc = value_match( &match, slap_schema.si_ad_entryDN, mr,
SLAP_MR_EXT, &e->e_nname, &ava->aa_value, &text );
{
struct slap_limits **lm;
- assert( op );
- assert( limit );
+ assert( op != NULL );
+ assert( limit != NULL );
Debug( LDAP_DEBUG_TRACE, "==> limits_get: %s dn=\"%s\"\n",
op->o_log_prefix,
struct slap_limits *lm;
unsigned type, style;
- assert( be );
- assert( limit );
+ assert( be != NULL );
+ assert( limit != NULL );
type = flags & SLAP_LIMITS_TYPE_MASK;
style = flags & SLAP_LIMITS_MASK;
switch ( type ) {
case SLAP_LIMITS_TYPE_GROUP:
- assert( group_oc );
- assert( group_ad );
+ assert( group_oc != NULL );
+ assert( group_ad != NULL );
lm->lm_group_oc = group_oc;
lm->lm_group_ad = group_ad;
break;
ObjectClass *group_oc = NULL;
AttributeDescription *group_ad = NULL;
- assert( be );
+ assert( be != NULL );
if ( argc < 3 ) {
Debug( LDAP_DEBUG_ANY,
struct slap_limits_set *limit
)
{
- assert( arg );
- assert( limit );
+ assert( arg != NULL );
+ assert( limit != NULL );
if ( strncasecmp( arg, "time", STRLENOF( "time" ) ) == 0 ) {
arg += STRLENOF( "time" );
int
limits_check( Operation *op, SlapReply *rs )
{
- assert( op );
- assert( rs );
+ assert( op != NULL );
+ assert( rs != NULL );
/* FIXME: should this be always true? */
assert( op->o_tag == LDAP_REQ_SEARCH);
ber_dupbv( &mod->sml_values[0], &tmpval );
mod->sml_values[1].bv_len = 0;
mod->sml_values[1].bv_val = NULL;
- assert( mod->sml_values[0].bv_val );
+ assert( mod->sml_values[0].bv_val != NULL );
mod->sml_nvalues =
(BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
ber_dupbv( &mod->sml_nvalues[0], &tmpval );
mod->sml_nvalues[1].bv_len = 0;
mod->sml_nvalues[1].bv_val = NULL;
- assert( mod->sml_nvalues[0].bv_val );
+ assert( mod->sml_nvalues[0].bv_val != NULL );
*modtail = mod;
modtail = &mod->sml_next;
}
ber_dupbv( &mod->sml_values[0], &tmpval );
mod->sml_values[1].bv_len = 0;
mod->sml_values[1].bv_val = NULL;
- assert( mod->sml_values[0].bv_val );
+ assert( mod->sml_values[0].bv_val != NULL );
mod->sml_nvalues =
(BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
(*mod->sml_desc->ad_type->sat_equality->smr_normalize)(
ber_dupbv( &mod->sml_values[0], &name );
mod->sml_values[1].bv_len = 0;
mod->sml_values[1].bv_val = NULL;
- assert( mod->sml_values[0].bv_val );
+ assert( mod->sml_values[0].bv_val != NULL );
mod->sml_nvalues =
(BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
ber_dupbv( &mod->sml_nvalues[0], &nname );
mod->sml_nvalues[1].bv_len = 0;
mod->sml_nvalues[1].bv_val = NULL;
- assert( mod->sml_nvalues[0].bv_val );
+ assert( mod->sml_nvalues[0].bv_val != NULL );
*modtail = mod;
modtail = &mod->sml_next;
ber_dupbv( &mod->sml_values[0], ×tamp );
mod->sml_values[1].bv_len = 0;
mod->sml_values[1].bv_val = NULL;
- assert( mod->sml_values[0].bv_val );
+ assert( mod->sml_values[0].bv_val != NULL );
mod->sml_nvalues = NULL;
*modtail = mod;
modtail = &mod->sml_next;
ber_dupbv( &mod->sml_values[0], &csn );
mod->sml_values[1].bv_len = 0;
mod->sml_values[1].bv_val = NULL;
- assert( mod->sml_values[0].bv_val );
+ assert( mod->sml_values[0].bv_val != NULL );
mod->sml_nvalues = NULL;
*modtail = mod;
modtail = &mod->sml_next;
ber_dupbv( &mod->sml_values[0], &name );
mod->sml_values[1].bv_len = 0;
mod->sml_values[1].bv_val = NULL;
- assert( mod->sml_values[0].bv_val );
+ assert( mod->sml_values[0].bv_val != NULL );
mod->sml_nvalues =
(BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
ber_dupbv( &mod->sml_nvalues[0], &nname );
mod->sml_nvalues[1].bv_len = 0;
mod->sml_nvalues[1].bv_val = NULL;
- assert( mod->sml_nvalues[0].bv_val );
+ assert( mod->sml_nvalues[0].bv_val != NULL );
*modtail = mod;
modtail = &mod->sml_next;
ber_dupbv( &mod->sml_values[0], ×tamp );
mod->sml_values[1].bv_len = 0;
mod->sml_values[1].bv_val = NULL;
- assert( mod->sml_values[0].bv_val );
+ assert( mod->sml_values[0].bv_val != NULL );
mod->sml_nvalues = NULL;
*modtail = mod;
modtail = &mod->sml_next;
for ( p = i = 0; !BER_BVISNULL( &mod->sm_values[i] ); i++ ) {
int match;
- assert( a->a_vals[0].bv_val );
+ assert( a->a_vals[0].bv_val != NULL );
for ( j = 0; !BER_BVISNULL( &a->a_vals[j] ); j++ ) {
if ( mod->sm_nvalues ) {
rc = ordered_value_match( &match, mod->sm_desc, mr,
}
if( mod->sm_nvalues ) {
- assert( a->a_nvals );
+ assert( a->a_nvals != NULL );
rc = ordered_value_match( &match, a->a_desc, mr,
SLAP_MR_EQUALITY | SLAP_MR_VALUE_OF_ASSERTION_SYNTAX
| SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH
oir->oir_name.bv_len = strlen( soc->soc_oid );
oir->oir_oc = soc;
- assert( oir->oir_name.bv_val );
- assert( oir->oir_oc );
+ assert( oir->oir_name.bv_val != NULL );
+ assert( oir->oir_oc != NULL );
if ( avl_insert( &oc_index, (caddr_t) oir,
oc_index_cmp, avl_dup_error ) )
oir->oir_name.bv_len = strlen( *names );
oir->oir_oc = soc;
- assert( oir->oir_name.bv_val );
- assert( oir->oir_oc );
+ assert( oir->oir_name.bv_val != NULL );
+ assert( oir->oir_oc != NULL );
if ( avl_insert( &oc_index, (caddr_t) oir,
oc_index_cmp, avl_dup_error ) )
{
Attribute *a;
- assert( e );
+ assert( e != NULL );
assert( !BER_BVISNULL( &e->e_name ) );
assert( !BER_BVISNULL( &e->e_nname ) );
char *ptr;
- assert( oldf );
- assert( newf );
+ assert( oldf != NULL );
+ assert( newf != NULL );
assert( !BER_BVISNULL( oldf ) );
assert( !BER_BVISEMPTY( oldf ) );
int i;
for (i = 0; i<gi->gi_nodes; i++) {
- assert( gi->gi_n[i].gn_be->be_nsuffix );
+ assert( gi->gi_n[i].gn_be->be_nsuffix != NULL );
if (dnIsSuffix(dn, &gi->gi_n[i].gn_be->be_nsuffix[0])) {
return gi->gi_n[i].gn_be;
}
op->o_bd = btmp;
- assert( op->o_bd->be_suffix );
- assert( op->o_bd->be_nsuffix );
+ assert( op->o_bd->be_suffix != NULL );
+ assert( op->o_bd->be_nsuffix != NULL );
if (scope0 == LDAP_SCOPE_ONELEVEL &&
dn_match(pdn, &ndn))
{
Attribute *la;
- assert(mod);
+ assert(mod != NULL);
if ( (la = attr_find( e->e_attrs, ad_pwdAccountLockedTime )) != NULL ) {
BerVarray vals = la->a_nvals;
ber_dupbv( &mods->sml_values[0], ×tamp );
mods->sml_values[1].bv_len = 0;
mods->sml_values[1].bv_val = NULL;
- assert( mods->sml_values[0].bv_val );
+ assert( mods->sml_values[0].bv_val != NULL );
} else {
mods->sml_op = LDAP_MOD_DELETE;
mods->sml_values = NULL;
}
if ( mapping != NULL ) {
- assert( mapping->m_dst_ad );
+ assert( mapping->m_dst_ad != NULL );
(*ap)->a_desc = mapping->m_dst_ad;
}
}
}
} else {
- assert( mapping->m_dst_ad );
+ assert( mapping->m_dst_ad != NULL );
ad = mapping->m_dst_ad;
}
next_mod:;
if ( mapping != NULL ) {
/* use new attribute description */
- assert( mapping->m_dst_ad );
+ assert( mapping->m_dst_ad != NULL );
(*mlp)->sml_desc = mapping->m_dst_ad;
}
if ( mapping != NULL ) {
/* rewrite the attribute description */
- assert( mapping->m_dst_ad );
+ assert( mapping->m_dst_ad != NULL );
(*ap)->a_desc = mapping->m_dst_ad;
}
dncookie dc;
int rc;
- assert( rs->sr_entry );
+ assert( rs->sr_entry != NULL );
/*
* Rewrite the dn of the result, if needed
struct berval mdn;
static char *dmy = "";
- assert( dc );
- assert( in );
- assert( dn );
+ assert( dc != NULL );
+ assert( in != NULL );
+ assert( dn != NULL );
rc = rewrite_session( dc->rwmap->rwm_rw, dc->ctx,
( in->bv_val ? in->bv_val : dmy ),
int i, src, dst;
struct berval tmpin;
- assert( dc );
- assert( in );
- assert( dn );
+ assert( dc != NULL );
+ assert( in != NULL );
+ assert( dn != NULL );
BER_BVZERO( dn );
const char *text;
int rc;
- assert( m );
+ assert( m != NULL );
*m = NULL;
Avlnode *tree;
struct ldapmapping fmapping;
- assert( m );
+ assert( m != NULL );
if ( remap == RWM_REMAP ) {
tree = map->remap;
{
int i, j;
- assert( anp );
+ assert( anp != NULL );
*anp = NULL;
struct berval dn = BER_BVNULL,
ndn = BER_BVNULL;
- assert( a_vals );
+ assert( a_vals != NULL );
/*
* Rewrite the dn if needed
/* This op is done, remove it */
ldap_pvt_thread_mutex_lock( &sm->sm_mutex );
av = avl_find2( sm->sm_mods, &mtdummy, sm_avl_cmp );
- assert(av);
+ assert(av != NULL);
mt = av->avl_data;
* control.
*/
if ( !rs->sr_entry ) {
- assert( rs->sr_entry );
+ assert( rs->sr_entry != NULL );
Debug( LDAP_DEBUG_ANY, "bogus referral in context\n",0,0,0 );
return SLAP_CB_CONTINUE;
}
new->bv_len = 0;
new->bv_val = NULL;
- assert( hash );
+ assert( hash != NULL );
lutil_passwd_hash( cred , hash, new, text );
}
{
int i = 0;
- assert( be );
- assert( host );
+ assert( be != NULL );
+ assert( host != NULL );
if ( be->be_replica != NULL ) {
for ( ; be->be_replica[ i ] != NULL; i++ );
int slap_freeself_cb( Operation *op, SlapReply *rs )
{
- assert( op->o_callback );
+ assert( op->o_callback != NULL );
op->o_tmpfree( op->o_callback, op->o_tmpmemctx );
op->o_callback = NULL;
int rc, is_dn = SET_NONE, do_norm = 1;
struct berval dn2, *mech;
- assert( conn );
- assert( id );
+ assert( conn != NULL );
+ assert( id != NULL );
Debug( LDAP_DEBUG_ARGS, "slap_sasl_getdn: conn %lu id=%s [len=%lu]\n",
conn->c_connid,
{
char u;
- assert( id );
+ assert( id != NULL );
assert( !BER_BVISNULL( id ) );
- assert( user );
- assert( realm );
- assert( mech );
+ assert( user != NULL );
+ assert( realm != NULL );
+ assert( mech != NULL );
u = id->bv_val[ 0 ];
}
nvals[0].bv_val = strchr( frontendDB->be_schemandn.bv_val, '=' );
- assert( nvals[0].bv_val );
+ assert( nvals[0].bv_val != NULL );
nvals[0].bv_val++;
nvals[0].bv_len = frontendDB->be_schemandn.bv_len -
(nvals[0].bv_val - frontendDB->be_schemandn.bv_val);
const char *type = a->a_desc->ad_cname.bv_val;
/* there should be at least one value */
- assert( a->a_vals );
+ assert( a->a_vals != NULL );
assert( a->a_vals[0].bv_val != NULL );
if( a->a_desc->ad_type->sat_check ) {
struct berval *out,
void *ctx )
{
- assert( val );
- assert( out );
+ assert( val != NULL );
+ assert( out != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> nameUIDPretty: <%s>\n", val->bv_val, 0, 0 );
ber_len_t n;
struct berval sn, i, newi;
- assert( val );
- assert( out );
+ assert( val != NULL );
+ assert( out != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> serialNumberAndIssuerPretty: <%s>\n",
val->bv_val, 0, 0 );
ber_len_t n;
struct berval sn, i, newi;
- assert( val );
- assert( out );
+ assert( val != NULL );
+ assert( out != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> serialNumberAndIssuerNormalize: <%s>\n",
val->bv_val, 0, 0 );
ocvalues[noc] = sup->soc_cname;
- assert( ocvalues[noc].bv_val );
- assert( ocvalues[noc].bv_len );
+ assert( ocvalues[noc].bv_val != NULL );
+ assert( ocvalues[noc].bv_len != 0 );
noc++;
Debug(LDAP_DEBUG_TRACE, "slap_sl_free: "
"free object not found while bit is clear.\n",
0, 0, 0);
- assert(so);
+ assert(so != NULL);
}
} else {
Debug(LDAP_DEBUG_TRACE, "slap_sl_free: "
"free object not found while bit is clear.\n",
0, 0, 0 );
- assert( so );
+ assert(so != NULL);
}
} else {
int numPB = 0;
int rc = LDAP_SUCCESS;
- assert( ppFuncPtrs );
+ assert( ppFuncPtrs != NULL );
/*
* First, count the plugins associated with a specific
int rc = LDAP_SUCCESS;
SLAPI_FUNC fpInitFunc = NULL;
- assert( pLdHandle );
+ assert( pLdHandle != NULL );
if ( lt_dlinit() ) {
return LDAP_LOCAL_ERROR;
)
{
Slapi_PBlock *pp;
- int i, j, rc;
+ int i, j;
char **argv, ibuf[32], *ptr;
struct berval idx, bv;
slapi_int_pblock_get_first( Backend *be, Slapi_PBlock **pb )
{
#if defined(LDAP_SLAPI)
- assert( pb );
+ assert( pb != NULL );
*pb = (Slapi_PBlock *)be->be_pb;
return (*pb == NULL ? LDAP_OTHER : LDAP_SUCCESS);
#else /* LDAP_SLAPI */
slapi_int_pblock_get_next( Slapi_PBlock **pb )
{
#if defined(LDAP_SLAPI)
- assert( pb );
+ assert( pb != NULL );
return slapi_pblock_get( *pb, SLAPI_IBM_PBLOCK, pb );
#else /* LDAP_SLAPI */
return LDAP_OTHER;
op->o_tag = LDAP_REQ_MODIFY;
- assert( *modlist );
+ assert( *modlist != NULL );
/* Delete all the old attrs */
for ( i = 0; i < dni.attrs; i++ ) {
Debug(LDAP_DEBUG_ANY, "slap_zn_free: "
"free object not found while bit is clear.\n",
0, 0, 0);
- assert(zo);
+ assert(zo != NULL);
}
} else {
Debug(LDAP_DEBUG_ANY, "slap_zn_free: "
"free object not found while bit is clear.\n",
0, 0, 0 );
- assert( zo );
+ assert(zo != NULL);
}
} else {
continue;
}
- assert( ldm );
+ assert( ldm != NULL );
/*
* We should have an attribute: value pair here.
}
#endif /* LDAP_DEBUG */
- assert( newrdn );
+ assert( newrdn != NULL );
/* Do the modrdn */
rc = ldap_rename2_s( ri->ri_ldp, re->re_dn, newrdn, newsup, drdnflag );