Note: the caller is expected to pass in a valid LDAP handle. If not,
the assert will trigger to let him know his code is broken.
BerElement *ber = NULL;
ber_tag_t tag;
- if ( ld == NULL || keyList == NULL || value == NULL ) {
- if ( ld )
- ld->ld_errno = LDAP_PARAM_ERROR;
+ assert( ld != NULL );
+ assert( LDAP_VALID( ld ) );
+
+ if ( ld == NULL ) return LDAP_PARAM_ERROR;
+ if ( keyList == NULL || value == NULL ) {
+ ld->ld_errno = LDAP_PARAM_ERROR;
return LDAP_PARAM_ERROR;
}
- assert( LDAP_VALID( ld ) );
-
value->bv_val = NULL;
value->bv_len = 0;
struct berval value;
BerElement *ber;
+ assert( ld != NULL );
+ assert( LDAP_VALID( ld ) );
+
+ if ( ld == NULL ) return LDAP_PARAM_ERROR;
if ( ctrlp == NULL ) {
ld->ld_errno = LDAP_PARAM_ERROR;
return ld->ld_errno;
ber_tag_t tag, berTag;
ber_len_t berLen;
+ assert( ld != NULL );
+ assert( LDAP_VALID( ld ) );
+
if (ld == NULL) {
return LDAP_PARAM_ERROR;
}