mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
assert expects int. (int)<nonnull ptr/long> can be 0. Use assert(arg!=0/NULL).
This commit is contained in:
parent
c2b65937fe
commit
81ecb0b153
@ -155,7 +155,7 @@ ber_memfree_x( void *p, void *ctx )
|
||||
return;
|
||||
}
|
||||
|
||||
assert( ber_int_memory_fns->bmf_free );
|
||||
assert( ber_int_memory_fns->bmf_free != 0 );
|
||||
|
||||
(*ber_int_memory_fns->bmf_free)( p, ctx );
|
||||
}
|
||||
|
@ -1206,7 +1206,7 @@ int ldap_pvt_sasl_mutex_lock(void *mutex)
|
||||
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;
|
||||
@ -1219,7 +1219,7 @@ int ldap_pvt_sasl_mutex_unlock(void *mutex)
|
||||
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;
|
||||
@ -1232,7 +1232,7 @@ void ldap_pvt_sasl_mutex_dispose(void *mutex)
|
||||
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 );
|
||||
|
@ -179,7 +179,7 @@ ldap_perror( LDAP *ld, LDAP_CONST char *str )
|
||||
|
||||
assert( ld != NULL );
|
||||
assert( LDAP_VALID( ld ) );
|
||||
assert( str );
|
||||
assert( str != NULL );
|
||||
|
||||
e = ldap_int_error( ld->ld_errno );
|
||||
|
||||
|
@ -358,7 +358,7 @@ ldap_dn_normalize( LDAP_CONST char *dnin,
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_dn_normalize\n", 0, 0, 0 );
|
||||
|
||||
assert( dnout );
|
||||
assert( dnout != NULL );
|
||||
|
||||
*dnout = NULL;
|
||||
|
||||
@ -563,8 +563,8 @@ ldapava_new( const struct berval *attr, const struct berval *val,
|
||||
{
|
||||
LDAPAVA *ava;
|
||||
|
||||
assert( attr );
|
||||
assert( val );
|
||||
assert( attr != NULL );
|
||||
assert( val != NULL );
|
||||
|
||||
ava = LDAP_MALLOCX( sizeof( LDAPAVA ) + attr->bv_len + 1, ctx );
|
||||
|
||||
@ -586,7 +586,7 @@ ldapava_new( const struct berval *attr, const struct berval *val,
|
||||
void
|
||||
ldapava_free( LDAPAVA *ava, void *ctx )
|
||||
{
|
||||
assert( ava );
|
||||
assert( ava != NULL );
|
||||
|
||||
#if 0
|
||||
/* ava's private must be freed by caller
|
||||
@ -673,7 +673,7 @@ ldap_str2dn( LDAP_CONST char *str, LDAPDN *dn, unsigned flags )
|
||||
{
|
||||
struct berval bv;
|
||||
|
||||
assert( str );
|
||||
assert( str != NULL );
|
||||
|
||||
bv.bv_len = strlen( str );
|
||||
bv.bv_val = (char *) str;
|
||||
@ -700,9 +700,9 @@ ldap_bv2dn_x( struct berval *bvin, LDAPDN *dn, unsigned flags, void *ctx )
|
||||
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;
|
||||
@ -911,7 +911,7 @@ ldap_str2rdn( LDAP_CONST char *str, LDAPRDN *rdn,
|
||||
{
|
||||
struct berval bv;
|
||||
|
||||
assert( str );
|
||||
assert( str != NULL );
|
||||
assert( str[ 0 ] != '\0' ); /* FIXME: is this required? */
|
||||
|
||||
bv.bv_len = strlen( str );
|
||||
@ -949,11 +949,11 @@ ldap_bv2rdn_x( struct berval *bv, LDAPRDN *rdn,
|
||||
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;
|
||||
@ -1435,9 +1435,9 @@ str2strval( const char *str, ber_len_t stoplen, struct berval *val, const char *
|
||||
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;
|
||||
@ -1581,9 +1581,9 @@ DCE2strval( const char *str, struct berval *val, const char **next, unsigned fla
|
||||
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;
|
||||
|
||||
@ -1666,9 +1666,9 @@ IA52strval( const char *str, struct berval *val, const char **next, unsigned fla
|
||||
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;
|
||||
|
||||
@ -1742,9 +1742,9 @@ quotedIA52strval( const char *str, struct berval *val, const char **next, unsign
|
||||
ber_len_t len;
|
||||
unsigned escapes = 0;
|
||||
|
||||
assert( str );
|
||||
assert( val );
|
||||
assert( next );
|
||||
assert( str != NULL );
|
||||
assert( val != NULL );
|
||||
assert( next != NULL );
|
||||
|
||||
*next = NULL;
|
||||
|
||||
@ -1832,8 +1832,8 @@ hexstr2bin( const char *str, char *c )
|
||||
{
|
||||
char c1, c2;
|
||||
|
||||
assert( str );
|
||||
assert( c );
|
||||
assert( str != NULL );
|
||||
assert( c != NULL );
|
||||
|
||||
c1 = str[ 0 ];
|
||||
c2 = str[ 1 ];
|
||||
@ -1874,9 +1874,9 @@ hexstr2binval( const char *str, struct berval *val, const char **next, unsigned
|
||||
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;
|
||||
|
||||
@ -1976,8 +1976,8 @@ byte2hexpair( const char *val, char *pair )
|
||||
{
|
||||
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
|
||||
@ -1998,8 +1998,8 @@ binval2hexstr( struct berval *val, char *str )
|
||||
{
|
||||
ber_len_t s, d;
|
||||
|
||||
assert( val );
|
||||
assert( str );
|
||||
assert( val != NULL );
|
||||
assert( str != NULL );
|
||||
|
||||
if ( val->bv_len == 0 ) {
|
||||
return( 0 );
|
||||
@ -2031,8 +2031,8 @@ strval2strlen( struct berval *val, unsigned flags, ber_len_t *len )
|
||||
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 ) {
|
||||
@ -2109,9 +2109,9 @@ strval2str( struct berval *val, char *str, unsigned flags, ber_len_t *len )
|
||||
{
|
||||
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;
|
||||
@ -2208,8 +2208,8 @@ strval2IA5strlen( struct berval *val, unsigned flags, ber_len_t *len )
|
||||
ber_len_t l;
|
||||
char *p;
|
||||
|
||||
assert( val );
|
||||
assert( len );
|
||||
assert( val != NULL );
|
||||
assert( len != NULL );
|
||||
|
||||
*len = 0;
|
||||
if ( val->bv_len == 0 ) {
|
||||
@ -2250,9 +2250,9 @@ strval2IA5str( struct berval *val, char *str, unsigned flags, ber_len_t *len )
|
||||
{
|
||||
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;
|
||||
@ -2298,8 +2298,8 @@ strval2DCEstrlen( struct berval *val, unsigned flags, ber_len_t *len )
|
||||
ber_len_t l;
|
||||
char *p;
|
||||
|
||||
assert( val );
|
||||
assert( len );
|
||||
assert( val != NULL );
|
||||
assert( len != NULL );
|
||||
|
||||
*len = 0;
|
||||
if ( val->bv_len == 0 ) {
|
||||
@ -2338,9 +2338,9 @@ strval2DCEstr( struct berval *val, char *str, unsigned flags, ber_len_t *len )
|
||||
{
|
||||
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;
|
||||
@ -2384,8 +2384,8 @@ strval2ADstrlen( struct berval *val, unsigned flags, ber_len_t *len )
|
||||
ber_len_t l;
|
||||
char *p;
|
||||
|
||||
assert( val );
|
||||
assert( len );
|
||||
assert( val != NULL );
|
||||
assert( len != NULL );
|
||||
|
||||
*len = 0;
|
||||
if ( val->bv_len == 0 ) {
|
||||
@ -2424,9 +2424,9 @@ strval2ADstr( struct berval *val, char *str, unsigned flags, ber_len_t *len )
|
||||
{
|
||||
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;
|
||||
@ -2477,9 +2477,9 @@ dn2domain( LDAPDN dn, struct berval *bv, int pos, int *iRDN )
|
||||
/* 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;
|
||||
@ -2488,10 +2488,10 @@ dn2domain( LDAPDN dn, struct berval *bv, int pos, int *iRDN )
|
||||
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 ) ) {
|
||||
@ -2678,8 +2678,8 @@ rdn2UFNstrlen( LDAPRDN rdn, unsigned flags, ber_len_t *len )
|
||||
int iAVA;
|
||||
ber_len_t l = 0;
|
||||
|
||||
assert( rdn );
|
||||
assert( len );
|
||||
assert( rdn != NULL );
|
||||
assert( len != NULL );
|
||||
|
||||
*len = 0;
|
||||
|
||||
@ -2757,8 +2757,8 @@ rdn2ADstrlen( LDAPRDN rdn, unsigned flags, ber_len_t *len )
|
||||
int iAVA;
|
||||
ber_len_t l = 0;
|
||||
|
||||
assert( rdn );
|
||||
assert( len );
|
||||
assert( rdn != NULL );
|
||||
assert( len != NULL );
|
||||
|
||||
*len = 0;
|
||||
|
||||
@ -2838,7 +2838,7 @@ ldap_rdn2str( LDAPRDN rdn, char **str, unsigned flags )
|
||||
struct berval bv;
|
||||
int rc;
|
||||
|
||||
assert( str );
|
||||
assert( str != NULL );
|
||||
|
||||
if((flags & LDAP_DN_FORMAT_MASK) == LDAP_DN_FORMAT_LBER) {
|
||||
return LDAP_PARAM_ERROR;
|
||||
@ -2861,7 +2861,7 @@ ldap_rdn2bv_x( LDAPRDN rdn, struct berval *bv, unsigned flags, void *ctx )
|
||||
int rc, back;
|
||||
ber_len_t l;
|
||||
|
||||
assert( bv );
|
||||
assert( bv != NULL );
|
||||
|
||||
bv->bv_len = 0;
|
||||
bv->bv_val = NULL;
|
||||
@ -2971,7 +2971,7 @@ int ldap_dn2str( LDAPDN dn, char **str, unsigned flags )
|
||||
struct berval bv;
|
||||
int rc;
|
||||
|
||||
assert( str );
|
||||
assert( str != NULL );
|
||||
|
||||
if((flags & LDAP_DN_FORMAT_MASK) == LDAP_DN_FORMAT_LBER) {
|
||||
return LDAP_PARAM_ERROR;
|
||||
@ -2997,7 +2997,7 @@ int ldap_dn2bv_x( LDAPDN dn, struct berval *bv, unsigned flags, void *ctx )
|
||||
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;
|
||||
|
||||
@ -3356,7 +3356,7 @@ ldap_X509dn2bv( void *x509_name, struct berval *bv, LDAPDN_rewrite_func *func,
|
||||
|
||||
struct berval Val;
|
||||
|
||||
assert( bv );
|
||||
assert( bv != NULL );
|
||||
bv->bv_len = 0;
|
||||
bv->bv_val = NULL;
|
||||
|
||||
|
@ -138,7 +138,7 @@ ldap_parse_passwordpolicy_control(
|
||||
|
||||
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);
|
||||
|
@ -187,8 +187,8 @@ chkResponseList(
|
||||
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
|
||||
@ -222,7 +222,7 @@ chkResponseList(
|
||||
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;
|
||||
}
|
||||
@ -868,8 +868,8 @@ lr->lr_res_matched ? lr->lr_res_matched : "" );
|
||||
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
|
||||
|
@ -126,7 +126,7 @@ ldap_pvt_str2upperbv( char *str, struct berval *bv )
|
||||
{
|
||||
char *s = NULL;
|
||||
|
||||
assert( bv );
|
||||
assert( bv != NULL );
|
||||
|
||||
/* to upper */
|
||||
if ( str ) {
|
||||
@ -161,7 +161,7 @@ ldap_pvt_str2lowerbv( char *str, struct berval *bv )
|
||||
{
|
||||
char *s = NULL;
|
||||
|
||||
assert( bv );
|
||||
assert( bv != NULL );
|
||||
|
||||
/* to lower */
|
||||
if ( str ) {
|
||||
|
@ -53,7 +53,7 @@ static const char* skip_url_prefix LDAP_P((
|
||||
|
||||
int ldap_pvt_url_scheme2proto( const char *scheme )
|
||||
{
|
||||
assert( scheme );
|
||||
assert( scheme != NULL );
|
||||
|
||||
if( scheme == NULL ) {
|
||||
return -1;
|
||||
@ -81,7 +81,7 @@ int ldap_pvt_url_scheme2proto( const char *scheme )
|
||||
|
||||
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;
|
||||
@ -110,7 +110,7 @@ int ldap_pvt_url_scheme_port( const char *scheme, int port )
|
||||
int
|
||||
ldap_pvt_url_scheme2tls( const char *scheme )
|
||||
{
|
||||
assert( scheme );
|
||||
assert( scheme != NULL );
|
||||
|
||||
if( scheme == NULL ) {
|
||||
return -1;
|
||||
@ -804,7 +804,7 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp )
|
||||
return LDAP_URL_ERR_BADSCHEME;
|
||||
}
|
||||
|
||||
assert( scheme );
|
||||
assert( scheme != NULL );
|
||||
|
||||
/* make working copy of the remainder of the URL */
|
||||
url = LDAP_STRDUP( url_tmp );
|
||||
|
@ -389,9 +389,9 @@ ldif_must_b64_encode_register( LDAP_CONST char *name, LDAP_CONST char *oid )
|
||||
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 );
|
||||
|
||||
@ -444,7 +444,7 @@ ldif_must_b64_encode_release( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
assert( must_b64_encode );
|
||||
assert( must_b64_encode != NULL );
|
||||
|
||||
if ( must_b64_encode == default_must_b64_encode ) {
|
||||
return;
|
||||
@ -470,8 +470,8 @@ ldif_must_b64_encode( LDAP_CONST char *s )
|
||||
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 );
|
||||
|
||||
|
@ -433,7 +433,7 @@ rewrite_context_free(
|
||||
{
|
||||
struct rewrite_context *context = (struct rewrite_context *)tmp;
|
||||
|
||||
assert( tmp );
|
||||
assert( tmp != NULL );
|
||||
|
||||
rewrite_context_destroy( &context );
|
||||
}
|
||||
@ -446,12 +446,12 @@ rewrite_context_destroy(
|
||||
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;
|
||||
@ -463,7 +463,7 @@ rewrite_context_destroy(
|
||||
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;
|
||||
|
||||
|
@ -339,8 +339,8 @@ map_ldap_destroy(
|
||||
{
|
||||
struct ldap_map_data *data;
|
||||
|
||||
assert( pmap );
|
||||
assert( *pmap );
|
||||
assert( pmap != NULL );
|
||||
assert( *pmap != NULL );
|
||||
|
||||
data = ( struct ldap_map_data * )(*pmap)->lb_private;
|
||||
|
||||
|
@ -438,7 +438,7 @@ rewrite_builtin_map_free(
|
||||
{
|
||||
struct rewrite_builtin_map *map = ( struct rewrite_builtin_map * )tmp;
|
||||
|
||||
assert( map );
|
||||
assert( map != NULL );
|
||||
|
||||
switch ( map->lb_type ) {
|
||||
case REWRITE_BUILTIN_MAP_LDAP:
|
||||
@ -461,8 +461,8 @@ rewrite_map_destroy(
|
||||
{
|
||||
struct rewrite_map *map;
|
||||
|
||||
assert( pmap );
|
||||
assert( *pmap );
|
||||
assert( pmap != NULL );
|
||||
assert( *pmap != NULL );
|
||||
|
||||
map = *pmap;
|
||||
|
||||
|
@ -72,8 +72,8 @@ destroy_action(
|
||||
{
|
||||
struct rewrite_action *action;
|
||||
|
||||
assert( paction );
|
||||
assert( *paction );
|
||||
assert( paction != NULL );
|
||||
assert( *paction != NULL );
|
||||
|
||||
action = *paction;
|
||||
|
||||
@ -462,8 +462,8 @@ rewrite_rule_destroy(
|
||||
struct rewrite_rule *rule;
|
||||
struct rewrite_action *action;
|
||||
|
||||
assert( prule );
|
||||
assert( *prule );
|
||||
assert( prule != NULL );
|
||||
assert( *prule != NULL );
|
||||
|
||||
rule = *prule;
|
||||
|
||||
|
@ -177,7 +177,7 @@ rewrite_session_return(
|
||||
struct rewrite_session *session
|
||||
)
|
||||
{
|
||||
assert( session );
|
||||
assert( session != NULL );
|
||||
ldap_pvt_thread_mutex_unlock( &session->ls_mutex );
|
||||
}
|
||||
|
||||
|
@ -453,8 +453,8 @@ rewrite_subst_destroy(
|
||||
int n;
|
||||
struct rewrite_subst *subst;
|
||||
|
||||
assert( psubst );
|
||||
assert( *psubst );
|
||||
assert( psubst != NULL );
|
||||
assert( *psubst != NULL );
|
||||
|
||||
subst = *psubst;
|
||||
|
||||
|
@ -437,8 +437,8 @@ rewrite_xmap_destroy(
|
||||
{
|
||||
struct rewrite_map *map;
|
||||
|
||||
assert( pmap );
|
||||
assert( *pmap );
|
||||
assert( pmap != NULL );
|
||||
assert( *pmap != NULL );
|
||||
|
||||
map = *pmap;
|
||||
|
||||
|
@ -166,7 +166,7 @@ slap_access_always_allowed(
|
||||
AccessControlState *state,
|
||||
slap_mask_t *maskp )
|
||||
{
|
||||
assert( maskp );
|
||||
assert( maskp != NULL );
|
||||
|
||||
ACL_PRIV_SET( *maskp, ACL_ACCESS2PRIV( access ) );
|
||||
|
||||
@ -3208,7 +3208,7 @@ dynacl_aci_unparse( void *priv, struct berval *bv )
|
||||
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=" );
|
||||
|
@ -228,7 +228,7 @@ at_destroy( void )
|
||||
int
|
||||
at_start( AttributeType **at )
|
||||
{
|
||||
assert( at );
|
||||
assert( at != NULL );
|
||||
|
||||
*at = LDAP_STAILQ_FIRST(&attr_list);
|
||||
|
||||
@ -238,7 +238,7 @@ at_start( AttributeType **at )
|
||||
int
|
||||
at_next( AttributeType **at )
|
||||
{
|
||||
assert( at );
|
||||
assert( at != NULL );
|
||||
|
||||
#if 1 /* pedantic check */
|
||||
{
|
||||
@ -250,7 +250,7 @@ at_next( AttributeType **at )
|
||||
}
|
||||
}
|
||||
|
||||
assert( tmp );
|
||||
assert( tmp != NULL );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -126,7 +126,7 @@ attr_dup( Attribute *a )
|
||||
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) );
|
||||
|
@ -1063,7 +1063,7 @@ bdb_cache_delete(
|
||||
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;
|
||||
|
@ -170,7 +170,7 @@ static int indexer(
|
||||
DB *db;
|
||||
struct berval *keys;
|
||||
|
||||
assert( mask );
|
||||
assert( mask != 0 );
|
||||
|
||||
rc = bdb_db_cache( op->o_bd, atname->bv_val, &db );
|
||||
|
||||
|
@ -36,7 +36,7 @@ bdb_hasSubordinates(
|
||||
{
|
||||
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
|
||||
@ -89,7 +89,7 @@ bdb_operational(
|
||||
{
|
||||
Attribute **ap;
|
||||
|
||||
assert( rs->sr_entry );
|
||||
assert( rs->sr_entry != NULL );
|
||||
|
||||
for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next )
|
||||
/* just count */ ;
|
||||
@ -102,7 +102,7 @@ bdb_operational(
|
||||
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;
|
||||
}
|
||||
|
@ -954,7 +954,7 @@ static int oc_filter(
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
assert( f );
|
||||
assert( f != NULL );
|
||||
|
||||
if( cur > *max ) *max = cur;
|
||||
|
||||
|
@ -327,8 +327,8 @@ ID 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? */
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "=> " LDAP_XSTRING(bdb_tool_entry_put)
|
||||
@ -524,8 +524,8 @@ ID bdb_tool_entry_modify(
|
||||
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 );
|
||||
|
@ -1280,7 +1280,7 @@ ldap_back_proxy_authz_ctrl_free( Operation *op, LDAPControl ***pctrls )
|
||||
* 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 );
|
||||
|
@ -132,8 +132,8 @@ chaining_control_remove(
|
||||
* 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 );
|
||||
|
||||
|
@ -459,7 +459,7 @@ ldap_build_entry(
|
||||
int last;
|
||||
|
||||
/* safe assumptions ... */
|
||||
assert( ent );
|
||||
assert( ent != NULL );
|
||||
BER_BVZERO( &ent->e_bv );
|
||||
|
||||
if ( ber_scanf( &ber, "{m{", bdn ) == LBER_ERROR ) {
|
||||
|
@ -228,7 +228,7 @@ static int dnlist_subordinate(
|
||||
BerVarray dnlist,
|
||||
struct berval *dn )
|
||||
{
|
||||
assert( dnlist );
|
||||
assert( dnlist != NULL );
|
||||
|
||||
for( ; dnlist->bv_val != NULL; dnlist++ ) {
|
||||
if( dnIsSuffix( dnlist, dn ) ) {
|
||||
|
@ -75,8 +75,8 @@ cache_entry_private_init( Entry*e )
|
||||
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 ); */
|
||||
|
||||
@ -86,7 +86,7 @@ cache_entry_commit( Entry *e )
|
||||
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;
|
||||
@ -106,7 +106,7 @@ cache_return_entry_rw( Cache *cache, Entry *e, int rw )
|
||||
/* 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;
|
||||
@ -326,7 +326,7 @@ cache_update_entry(
|
||||
/* 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 )
|
||||
@ -437,7 +437,7 @@ try_again:
|
||||
* 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;
|
||||
@ -509,7 +509,7 @@ try_again:
|
||||
|
||||
count++;
|
||||
|
||||
assert( ep->e_private );
|
||||
assert( ep->e_private != NULL );
|
||||
|
||||
ep_id = ep->e_id;
|
||||
state = LEI(ep)->lei_state;
|
||||
@ -575,7 +575,7 @@ cache_delete_entry(
|
||||
/* 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 );
|
||||
|
@ -122,7 +122,7 @@ dn2id(
|
||||
|
||||
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 );
|
||||
|
@ -55,7 +55,7 @@ ldbm_back_operational(
|
||||
{
|
||||
Attribute **ap;
|
||||
|
||||
assert( rs->sr_entry );
|
||||
assert( rs->sr_entry != NULL );
|
||||
|
||||
for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next )
|
||||
/* just count */ ;
|
||||
@ -67,7 +67,7 @@ ldbm_back_operational(
|
||||
|
||||
hs = has_children( op->o_bd, rs->sr_entry );
|
||||
*ap = slap_operational_hasSubordinate( hs );
|
||||
assert( *ap );
|
||||
assert( *ap != NULL );
|
||||
|
||||
ap = &(*ap)->a_next;
|
||||
}
|
||||
|
@ -183,8 +183,8 @@ ID ldbm_tool_entry_put(
|
||||
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 ) {
|
||||
|
@ -97,8 +97,8 @@ meta_dncache_get_target(
|
||||
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 );
|
||||
@ -149,8 +149,8 @@ meta_dncache_update_entry(
|
||||
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;
|
||||
@ -209,8 +209,8 @@ meta_dncache_delete_entry(
|
||||
metadncacheentry_t *entry,
|
||||
tmp_entry;
|
||||
|
||||
assert( cache );
|
||||
assert( ndn );
|
||||
assert( cache != NULL );
|
||||
assert( ndn != NULL );
|
||||
|
||||
tmp_entry.dn = *ndn;
|
||||
|
||||
|
@ -87,7 +87,7 @@ ldap_back_map_init ( struct ldapmap *lm, struct ldapmapping **m )
|
||||
{
|
||||
struct ldapmapping *mapping;
|
||||
|
||||
assert( m );
|
||||
assert( m != NULL );
|
||||
|
||||
*m = NULL;
|
||||
|
||||
@ -116,7 +116,7 @@ ldap_back_mapping ( struct ldapmap *map, struct berval *s, struct ldapmapping **
|
||||
Avlnode *tree;
|
||||
struct ldapmapping fmapping;
|
||||
|
||||
assert( m );
|
||||
assert( m != NULL );
|
||||
|
||||
if ( remap == BACKLDAP_REMAP ) {
|
||||
tree = map->remap;
|
||||
@ -601,8 +601,8 @@ ldap_back_referral_result_rewrite(
|
||||
{
|
||||
int i, last;
|
||||
|
||||
assert( dc );
|
||||
assert( a_vals );
|
||||
assert( dc != NULL );
|
||||
assert( a_vals != NULL );
|
||||
|
||||
for ( last = 0; !BER_BVISNULL( &a_vals[ last ] ); last++ )
|
||||
;
|
||||
|
@ -126,7 +126,7 @@ ldap_back_dn_massage(
|
||||
int i, src, dst;
|
||||
struct berval pretty = {0,NULL}, *dn = odn;
|
||||
|
||||
assert( res );
|
||||
assert( res != NULL );
|
||||
|
||||
if ( dn == NULL ) {
|
||||
res->bv_val = NULL;
|
||||
|
@ -183,8 +183,8 @@ monitor_subsys_conn_update(
|
||||
current_bv = BER_BVC( "cn=current" );
|
||||
struct berval rdn;
|
||||
|
||||
assert( mi );
|
||||
assert( e );
|
||||
assert( mi != NULL );
|
||||
assert( e != NULL );
|
||||
|
||||
dnRdn( &e->e_nname, &rdn );
|
||||
|
||||
|
@ -280,7 +280,7 @@ monitor_subsys_database_init(
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert( on2 );
|
||||
assert( on2 != NULL );
|
||||
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"cn=Overlay %d,%s",
|
||||
@ -429,7 +429,7 @@ monitor_subsys_database_init(
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert( on2 );
|
||||
assert( on2 != NULL );
|
||||
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=Overlay %d,cn=Database %d,%s\n"
|
||||
|
@ -216,7 +216,7 @@ monitor_back_register_subsys(
|
||||
|
||||
/* 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;
|
||||
@ -1387,7 +1387,7 @@ monitor_back_db_open(
|
||||
#endif
|
||||
static char tmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
|
||||
|
||||
assert( be_monitor );
|
||||
assert( be_monitor != NULL );
|
||||
if ( be != be_monitor ) {
|
||||
be_monitor = be;
|
||||
}
|
||||
@ -1590,7 +1590,7 @@ monitor_back_db_open(
|
||||
ep = &mp->mp_next;
|
||||
}
|
||||
|
||||
assert( be );
|
||||
assert( be != NULL );
|
||||
|
||||
be->be_private = mi;
|
||||
|
||||
|
@ -168,8 +168,8 @@ monitor_subsys_ops_update(
|
||||
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 );
|
||||
|
||||
|
@ -41,7 +41,7 @@ monitor_back_operational(
|
||||
{
|
||||
Attribute **ap;
|
||||
|
||||
assert( rs->sr_entry );
|
||||
assert( rs->sr_entry != NULL );
|
||||
|
||||
for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next )
|
||||
/* just count */ ;
|
||||
@ -54,11 +54,11 @@ monitor_back_operational(
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ monitor_subsys_rww_update(
|
||||
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 );
|
||||
|
@ -156,8 +156,8 @@ monitor_subsys_sent_update(
|
||||
Attribute *a;
|
||||
int i;
|
||||
|
||||
assert( mi );
|
||||
assert( e );
|
||||
assert( mi != NULL );
|
||||
assert( e != NULL );
|
||||
|
||||
dnRdn( &e->e_nname, &nrdn );
|
||||
|
||||
@ -195,7 +195,7 @@ monitor_subsys_sent_update(
|
||||
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 );
|
||||
|
@ -176,8 +176,8 @@ monitor_subsys_time_update(
|
||||
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 );
|
||||
|
||||
|
@ -100,7 +100,7 @@ relay_back_db_open( Backend *be )
|
||||
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 ) );
|
||||
|
@ -66,7 +66,7 @@ backsql_modify_delete_all_values(
|
||||
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(): "
|
||||
|
@ -35,8 +35,8 @@ backsql_api_config( backsql_info *bi, const char *name, int argc, char *argv[] )
|
||||
{
|
||||
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 ) {
|
||||
@ -66,7 +66,7 @@ backsql_api_destroy( backsql_info *bi )
|
||||
{
|
||||
backsql_api *ba;
|
||||
|
||||
assert( bi );
|
||||
assert( bi != NULL );
|
||||
|
||||
ba = bi->sql_api;
|
||||
|
||||
@ -88,7 +88,7 @@ backsql_api_register( backsql_api *ba )
|
||||
{
|
||||
backsql_api *ba2;
|
||||
|
||||
assert( ba );
|
||||
assert( ba != NULL );
|
||||
assert( ba->ba_private == NULL );
|
||||
|
||||
if ( ba->ba_name == NULL ) {
|
||||
|
@ -53,7 +53,7 @@ backsql_db_config(
|
||||
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 ) {
|
||||
@ -649,7 +649,7 @@ read_baseObject(
|
||||
int rc = 0, lineno = 0, lmax = 0;
|
||||
char *buf = NULL;
|
||||
|
||||
assert( fname );
|
||||
assert( fname != NULL );
|
||||
|
||||
fp = ldif_open( fname, "r" );
|
||||
if ( fp == NULL ) {
|
||||
@ -788,7 +788,7 @@ create_baseObject(
|
||||
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 ) {
|
||||
|
@ -39,7 +39,7 @@ backsql_free_entryID( Operation *op, backsql_entryID *id, int freeit )
|
||||
{
|
||||
backsql_entryID *next;
|
||||
|
||||
assert( id );
|
||||
assert( id != NULL );
|
||||
|
||||
next = id->eid_next;
|
||||
|
||||
@ -154,7 +154,7 @@ backsql_dn2id(
|
||||
/* 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,
|
||||
@ -367,7 +367,7 @@ backsql_count_children(
|
||||
/* 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,
|
||||
@ -470,8 +470,8 @@ backsql_get_attr_vals( void *v_at, void *v_bsi )
|
||||
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(): "
|
||||
@ -836,7 +836,7 @@ backsql_id2entry( backsql_srch_info *bsi, backsql_entryID *eid )
|
||||
|
||||
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 ) );
|
||||
|
||||
|
@ -247,10 +247,10 @@ backsql_db_open(
|
||||
|
||||
/* 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(): "
|
||||
|
@ -84,7 +84,7 @@ backsql_operational_entryCSN( Operation *op )
|
||||
|
||||
#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);
|
||||
|
||||
@ -164,7 +164,7 @@ backsql_operational(
|
||||
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;
|
||||
|
@ -800,9 +800,9 @@ backsql_supad2at( backsql_oc_map_rec *objclass, AttributeDescription *supad,
|
||||
struct supad2at_t va = { 0 };
|
||||
int rc;
|
||||
|
||||
assert( objclass );
|
||||
assert( supad );
|
||||
assert( pret );
|
||||
assert( objclass != NULL );
|
||||
assert( supad != NULL );
|
||||
assert( pret != NULL );
|
||||
|
||||
*pret = NULL;
|
||||
|
||||
|
@ -272,7 +272,7 @@ backsql_init_search(
|
||||
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 );
|
||||
@ -1250,7 +1250,7 @@ backsql_srch_query( backsql_srch_info *bsi, struct berval *query )
|
||||
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;
|
||||
@ -1344,7 +1344,7 @@ backsql_srch_query( backsql_srch_info *bsi, struct berval *query )
|
||||
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++ )
|
||||
{
|
||||
|
@ -322,7 +322,7 @@ backsql_open_db_conn( backsql_info *bi, unsigned long ldap_cid, backsql_db_conn
|
||||
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 );
|
||||
@ -435,7 +435,7 @@ backsql_get_db_conn( Operation *op, SQLHDBC *dbh )
|
||||
|
||||
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;
|
||||
|
@ -71,7 +71,7 @@ backsql_strcat( struct berbuf *dest, ... )
|
||||
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 ) );
|
||||
|
||||
@ -138,8 +138,8 @@ backsql_strfcat( struct berbuf *dest, const char *fmt, ... )
|
||||
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 ) );
|
||||
@ -225,7 +225,7 @@ backsql_strfcat( struct berbuf *dest, const char *fmt, ... )
|
||||
#endif /* BACKSQL_TRACE */
|
||||
}
|
||||
|
||||
assert( cstr );
|
||||
assert( cstr != NULL );
|
||||
|
||||
AC_MEMCPY( dest->bb_val.bv_val + cdlen, cstr, cslen + 1 );
|
||||
cdlen += cslen;
|
||||
@ -280,8 +280,8 @@ backsql_get_table_spec( backsql_info *bi, char **p )
|
||||
char *s, *q;
|
||||
struct berbuf res = BB_NULL;
|
||||
|
||||
assert( p );
|
||||
assert( *p );
|
||||
assert( p != NULL );
|
||||
assert( *p != NULL );
|
||||
|
||||
s = *p;
|
||||
while ( **p && **p != ',' ) {
|
||||
@ -397,8 +397,8 @@ backsql_split_pattern(
|
||||
|
||||
#define SPLIT_CHAR '?'
|
||||
|
||||
assert( _pattern );
|
||||
assert( split_pattern );
|
||||
assert( _pattern != NULL );
|
||||
assert( split_pattern != NULL );
|
||||
|
||||
pattern = ch_strdup( _pattern );
|
||||
|
||||
@ -457,7 +457,7 @@ backsql_prepare_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 ) {
|
||||
@ -496,9 +496,9 @@ backsql_entryUUID(
|
||||
|
||||
/* 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 ),
|
||||
|
@ -99,7 +99,7 @@ int backend_init(void)
|
||||
}
|
||||
|
||||
for( bi=slap_binfo; bi->bi_type != NULL; bi++,nBackendInfo++ ) {
|
||||
assert( bi->bi_init );
|
||||
assert( bi->bi_init != 0 );
|
||||
|
||||
rc = bi->bi_init( bi );
|
||||
|
||||
@ -202,7 +202,7 @@ int backend_startup_one(Backend *be)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
assert( be );
|
||||
assert( be != NULL );
|
||||
|
||||
be->be_pending_csn_list = (struct be_pcl *)
|
||||
ch_calloc( 1, sizeof( struct be_pcl ));
|
||||
@ -1613,9 +1613,9 @@ backend_access(
|
||||
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 );
|
||||
|
@ -600,7 +600,7 @@ overlay_find( const char *over_type )
|
||||
{
|
||||
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 ) {
|
||||
@ -635,7 +635,7 @@ overlay_is_inst( BackendDB *be, const char *over_type )
|
||||
{
|
||||
slap_overinst *on;
|
||||
|
||||
assert( be );
|
||||
assert( be != NULL );
|
||||
|
||||
if ( !overlay_is_over( be ) ) {
|
||||
return 0;
|
||||
|
@ -865,7 +865,7 @@ int bindconf_parse( const char *word, slap_bindconf *bc ) {
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
assert( tab->aux );
|
||||
assert( tab->aux != NULL );
|
||||
iptr = (int *)((char *)bc + tab->off);
|
||||
|
||||
rc = 1;
|
||||
@ -918,7 +918,7 @@ int bindconf_unparse( slap_bindconf *bc, struct berval *bv ) {
|
||||
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++ ) {
|
||||
|
@ -127,8 +127,8 @@ cr_insert(
|
||||
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 ) )
|
||||
@ -150,8 +150,8 @@ cr_insert(
|
||||
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 ) )
|
||||
|
@ -558,9 +558,9 @@ static int get_url_perms(
|
||||
{
|
||||
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++ ) {
|
||||
|
@ -59,14 +59,14 @@ LDAPRDN_validate( LDAPRDN rdn )
|
||||
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;
|
||||
@ -112,20 +112,20 @@ LDAPDN_validate( LDAPDN dn )
|
||||
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;
|
||||
@ -173,7 +173,7 @@ dnValidate(
|
||||
int rc;
|
||||
LDAPDN dn = NULL;
|
||||
|
||||
assert( in );
|
||||
assert( in != NULL );
|
||||
|
||||
if ( in->bv_len == 0 ) {
|
||||
return LDAP_SUCCESS;
|
||||
@ -211,7 +211,7 @@ rdnValidate(
|
||||
LDAPRDN rdn;
|
||||
char* p;
|
||||
|
||||
assert( in );
|
||||
assert( in != NULL );
|
||||
if ( in->bv_len == 0 ) {
|
||||
return LDAP_SUCCESS;
|
||||
|
||||
@ -261,14 +261,14 @@ AVA_Sort( LDAPRDN rdn, int iAVA )
|
||||
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 );
|
||||
|
||||
@ -337,7 +337,7 @@ LDAPRDN_rewrite( LDAPRDN rdn, unsigned flags, void *ctx )
|
||||
struct berval bv = BER_BVNULL;
|
||||
int do_sort = 0;
|
||||
|
||||
assert( ava );
|
||||
assert( ava != NULL );
|
||||
|
||||
if ( ( ad = AVA_PRIVATE( ava ) ) == NULL ) {
|
||||
const char *text = NULL;
|
||||
@ -444,13 +444,13 @@ LDAPDN_rewrite( LDAPDN dn, unsigned flags, void *ctx )
|
||||
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 ];
|
||||
@ -462,7 +462,7 @@ LDAPDN_rewrite( LDAPDN dn, unsigned flags, void *ctx )
|
||||
struct berval bv = BER_BVNULL;
|
||||
int do_sort = 0;
|
||||
|
||||
assert( ava );
|
||||
assert( ava != NULL );
|
||||
|
||||
if ( ( ad = AVA_PRIVATE( ava ) ) == NULL ) {
|
||||
const char *text = NULL;
|
||||
@ -570,8 +570,8 @@ dnNormalize(
|
||||
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 );
|
||||
|
||||
@ -626,8 +626,8 @@ rdnNormalize(
|
||||
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 ) {
|
||||
@ -682,8 +682,8 @@ dnPretty(
|
||||
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 );
|
||||
|
||||
@ -739,8 +739,8 @@ rdnPretty(
|
||||
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 );
|
||||
|
||||
@ -800,8 +800,8 @@ dnPrettyNormalDN(
|
||||
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",
|
||||
@ -854,9 +854,9 @@ dnPrettyNormal(
|
||||
{
|
||||
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 );
|
||||
@ -940,9 +940,9 @@ dnMatch(
|
||||
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 ) );
|
||||
|
||||
@ -975,9 +975,9 @@ dnRelativeMatch(
|
||||
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 ) );
|
||||
|
||||
@ -1074,9 +1074,9 @@ rdnMatch(
|
||||
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;
|
||||
|
||||
@ -1165,8 +1165,8 @@ dnExtractRdn(
|
||||
const char *p;
|
||||
int rc;
|
||||
|
||||
assert( dn );
|
||||
assert( rdn );
|
||||
assert( dn != NULL );
|
||||
assert( rdn != NULL );
|
||||
|
||||
if( dn->bv_len == 0 ) {
|
||||
return LDAP_OTHER;
|
||||
@ -1194,7 +1194,7 @@ dn_rdnlen(
|
||||
{
|
||||
const char *p;
|
||||
|
||||
assert( dn_in );
|
||||
assert( dn_in != NULL );
|
||||
|
||||
if ( dn_in == NULL ) {
|
||||
return 0;
|
||||
@ -1319,8 +1319,8 @@ dnIsSuffix(
|
||||
{
|
||||
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 ) {
|
||||
|
@ -779,8 +779,8 @@ filter_escape_value_x(
|
||||
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 );
|
||||
|
@ -444,7 +444,7 @@ static int test_mra_filter(
|
||||
int ret;
|
||||
const char *text;
|
||||
|
||||
assert( ad );
|
||||
assert( ad != NULL );
|
||||
|
||||
if ( mra->ma_desc ) {
|
||||
/* have a mra type? check for subtype */
|
||||
@ -588,7 +588,7 @@ test_ava_filter(
|
||||
}
|
||||
|
||||
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 );
|
||||
|
@ -72,8 +72,8 @@ limits_get(
|
||||
{
|
||||
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,
|
||||
@ -238,8 +238,8 @@ limits_add(
|
||||
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;
|
||||
@ -304,8 +304,8 @@ limits_add(
|
||||
|
||||
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;
|
||||
@ -342,7 +342,7 @@ limits_parse(
|
||||
ObjectClass *group_oc = NULL;
|
||||
AttributeDescription *group_ad = NULL;
|
||||
|
||||
assert( be );
|
||||
assert( be != NULL );
|
||||
|
||||
if ( argc < 3 ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
@ -637,8 +637,8 @@ limits_parse_one(
|
||||
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" );
|
||||
@ -1075,8 +1075,8 @@ t_hard:
|
||||
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);
|
||||
|
||||
|
@ -910,13 +910,13 @@ int slap_mods_opattrs(
|
||||
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;
|
||||
}
|
||||
@ -937,7 +937,7 @@ int slap_mods_opattrs(
|
||||
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)(
|
||||
@ -960,13 +960,13 @@ int slap_mods_opattrs(
|
||||
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;
|
||||
|
||||
@ -980,7 +980,7 @@ int slap_mods_opattrs(
|
||||
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;
|
||||
@ -997,7 +997,7 @@ int slap_mods_opattrs(
|
||||
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;
|
||||
@ -1011,13 +1011,13 @@ int slap_mods_opattrs(
|
||||
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;
|
||||
|
||||
@ -1030,7 +1030,7 @@ int slap_mods_opattrs(
|
||||
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;
|
||||
|
@ -90,7 +90,7 @@ modify_add_values(
|
||||
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,
|
||||
@ -245,7 +245,7 @@ modify_delete_vindex(
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -462,8 +462,8 @@ oc_insert(
|
||||
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 ) )
|
||||
@ -493,8 +493,8 @@ oc_insert(
|
||||
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 ) )
|
||||
|
@ -53,7 +53,7 @@ slap_operational_entryDN( Entry *e )
|
||||
{
|
||||
Attribute *a;
|
||||
|
||||
assert( e );
|
||||
assert( e != NULL );
|
||||
assert( !BER_BVISNULL( &e->e_name ) );
|
||||
assert( !BER_BVISNULL( &e->e_nname ) );
|
||||
|
||||
|
@ -87,8 +87,8 @@ dynlist_make_filter( Operation *op, struct berval *oldf, struct berval *newf )
|
||||
|
||||
char *ptr;
|
||||
|
||||
assert( oldf );
|
||||
assert( newf );
|
||||
assert( oldf != NULL );
|
||||
assert( newf != NULL );
|
||||
assert( !BER_BVISNULL( oldf ) );
|
||||
assert( !BER_BVISEMPTY( oldf ) );
|
||||
|
||||
|
@ -69,7 +69,7 @@ glue_back_select (
|
||||
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;
|
||||
@ -338,8 +338,8 @@ glue_op_search ( Operation *op, SlapReply *rs )
|
||||
}
|
||||
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))
|
||||
|
@ -212,7 +212,7 @@ account_locked( Operation *op, Entry *e,
|
||||
{
|
||||
Attribute *la;
|
||||
|
||||
assert(mod);
|
||||
assert(mod != NULL);
|
||||
|
||||
if ( (la = attr_find( e->e_attrs, ad_pwdAccountLockedTime )) != NULL ) {
|
||||
BerVarray vals = la->a_nvals;
|
||||
@ -1449,7 +1449,7 @@ do_modify:
|
||||
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;
|
||||
|
@ -207,7 +207,7 @@ rwm_op_add( Operation *op, SlapReply *rs )
|
||||
}
|
||||
|
||||
if ( mapping != NULL ) {
|
||||
assert( mapping->m_dst_ad );
|
||||
assert( mapping->m_dst_ad != NULL );
|
||||
(*ap)->a_desc = mapping->m_dst_ad;
|
||||
}
|
||||
}
|
||||
@ -344,7 +344,7 @@ rwm_op_compare( Operation *op, SlapReply *rs )
|
||||
}
|
||||
|
||||
} else {
|
||||
assert( mapping->m_dst_ad );
|
||||
assert( mapping->m_dst_ad != NULL );
|
||||
ad = mapping->m_dst_ad;
|
||||
}
|
||||
|
||||
@ -524,7 +524,7 @@ rwm_op_modify( Operation *op, SlapReply *rs )
|
||||
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;
|
||||
}
|
||||
|
||||
@ -972,7 +972,7 @@ rwm_attrs( Operation *op, SlapReply *rs, Attribute** a_first, int stripEntryDN )
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1004,7 +1004,7 @@ rwm_send_entry( Operation *op, SlapReply *rs )
|
||||
dncookie dc;
|
||||
int rc;
|
||||
|
||||
assert( rs->sr_entry );
|
||||
assert( rs->sr_entry != NULL );
|
||||
|
||||
/*
|
||||
* Rewrite the dn of the result, if needed
|
||||
|
@ -159,9 +159,9 @@ rwm_dn_massage(
|
||||
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 ),
|
||||
@ -221,9 +221,9 @@ rwm_dn_massage(
|
||||
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 );
|
||||
|
||||
|
@ -71,7 +71,7 @@ rwm_map_init( struct ldapmap *lm, struct ldapmapping **m )
|
||||
const char *text;
|
||||
int rc;
|
||||
|
||||
assert( m );
|
||||
assert( m != NULL );
|
||||
|
||||
*m = NULL;
|
||||
|
||||
@ -110,7 +110,7 @@ rwm_mapping( struct ldapmap *map, struct berval *s, struct ldapmapping **m, int
|
||||
Avlnode *tree;
|
||||
struct ldapmapping fmapping;
|
||||
|
||||
assert( m );
|
||||
assert( m != NULL );
|
||||
|
||||
if ( remap == RWM_REMAP ) {
|
||||
tree = map->remap;
|
||||
@ -163,7 +163,7 @@ rwm_map_attrnames(
|
||||
{
|
||||
int i, j;
|
||||
|
||||
assert( anp );
|
||||
assert( anp != NULL );
|
||||
|
||||
*anp = NULL;
|
||||
|
||||
@ -791,7 +791,7 @@ rwm_referral_rewrite(
|
||||
struct berval dn = BER_BVNULL,
|
||||
ndn = BER_BVNULL;
|
||||
|
||||
assert( a_vals );
|
||||
assert( a_vals != NULL );
|
||||
|
||||
/*
|
||||
* Rewrite the dn if needed
|
||||
|
@ -61,7 +61,7 @@ seqmod_op_cleanup( Operation *op, SlapReply *rs )
|
||||
/* 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;
|
||||
|
||||
|
@ -1696,7 +1696,7 @@ syncprov_search_response( Operation *op, SlapReply *rs )
|
||||
* 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;
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ slap_passwd_hash_type(
|
||||
new->bv_len = 0;
|
||||
new->bv_val = NULL;
|
||||
|
||||
assert( hash );
|
||||
assert( hash != NULL );
|
||||
|
||||
lutil_passwd_hash( cred , hash, new, text );
|
||||
}
|
||||
|
@ -48,8 +48,8 @@ add_replica_info(
|
||||
{
|
||||
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++ );
|
||||
|
@ -50,7 +50,7 @@ int slap_null_cb( Operation *op, SlapReply *rs )
|
||||
|
||||
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;
|
||||
|
@ -1522,8 +1522,8 @@ int slap_sasl_getdn( Connection *conn, Operation *op, struct berval *id,
|
||||
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,
|
||||
|
@ -131,11 +131,11 @@ int slap_parse_user( struct berval *id, struct berval *user,
|
||||
{
|
||||
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 ];
|
||||
|
||||
|
@ -103,7 +103,7 @@ schema_info( Entry **entry, const char **text )
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -79,7 +79,7 @@ entry_schema_check(
|
||||
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 ) {
|
||||
|
@ -892,8 +892,8 @@ nameUIDPretty(
|
||||
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 );
|
||||
@ -2398,8 +2398,8 @@ serialNumberAndIssuerPretty(
|
||||
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 );
|
||||
@ -2472,8 +2472,8 @@ serialNumberAndIssuerNormalize(
|
||||
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 );
|
||||
|
@ -297,8 +297,8 @@ static int objectSubClassIndexer(
|
||||
|
||||
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++;
|
||||
|
||||
|
@ -477,7 +477,7 @@ slap_sl_free(void *ptr, void *ctx)
|
||||
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 {
|
||||
@ -527,7 +527,7 @@ slap_sl_free(void *ptr, void *ctx)
|
||||
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 {
|
||||
|
@ -223,7 +223,7 @@ slapi_int_get_plugins(
|
||||
int numPB = 0;
|
||||
int rc = LDAP_SUCCESS;
|
||||
|
||||
assert( ppFuncPtrs );
|
||||
assert( ppFuncPtrs != NULL );
|
||||
|
||||
/*
|
||||
* First, count the plugins associated with a specific
|
||||
@ -610,7 +610,7 @@ slapi_int_load_plugin(
|
||||
int rc = LDAP_SUCCESS;
|
||||
SLAPI_FUNC fpInitFunc = NULL;
|
||||
|
||||
assert( pLdHandle );
|
||||
assert( pLdHandle != NULL );
|
||||
|
||||
if ( lt_dlinit() ) {
|
||||
return LDAP_LOCAL_ERROR;
|
||||
@ -768,7 +768,7 @@ slapi_int_plugin_unparse(
|
||||
)
|
||||
{
|
||||
Slapi_PBlock *pp;
|
||||
int i, j, rc;
|
||||
int i, j;
|
||||
char **argv, ibuf[32], *ptr;
|
||||
struct berval idx, bv;
|
||||
|
||||
|
@ -566,7 +566,7 @@ int
|
||||
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 */
|
||||
@ -581,7 +581,7 @@ int
|
||||
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;
|
||||
|
@ -1465,7 +1465,7 @@ retry_add:;
|
||||
|
||||
op->o_tag = LDAP_REQ_MODIFY;
|
||||
|
||||
assert( *modlist );
|
||||
assert( *modlist != NULL );
|
||||
|
||||
/* Delete all the old attrs */
|
||||
for ( i = 0; i < dni.attrs; i++ ) {
|
||||
|
@ -542,7 +542,7 @@ slap_zn_free(void *ptr, void *ctx)
|
||||
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 {
|
||||
@ -604,7 +604,7 @@ slap_zn_free(void *ptr, void *ctx)
|
||||
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 {
|
||||
|
@ -321,7 +321,7 @@ op_ldap_modify(
|
||||
continue;
|
||||
}
|
||||
|
||||
assert( ldm );
|
||||
assert( ldm != NULL );
|
||||
|
||||
/*
|
||||
* We should have an attribute: value pair here.
|
||||
@ -505,7 +505,7 @@ op_ldap_modrdn(
|
||||
}
|
||||
#endif /* LDAP_DEBUG */
|
||||
|
||||
assert( newrdn );
|
||||
assert( newrdn != NULL );
|
||||
|
||||
/* Do the modrdn */
|
||||
rc = ldap_rename2_s( ri->ri_ldp, re->re_dn, newrdn, newsup, drdnflag );
|
||||
|
Loading…
Reference in New Issue
Block a user