{
int i;
- for ( i = 0; a[i] != NULL; i++ ) {
+ if( a == NULL ) return 0;
+
+ for ( i=0; a[i] != NULL; i++ ) {
if ( strcasecmp( s, a[i] ) == 0 ) {
- return( 1 );
+ return 1;
}
}
- return( 0 );
+ return 0;
}
char **
Operation *op,
const char **text )
{
- LDAPControl **ctrls;
- ctrls = op->o_ctrls;
- if( ctrls == NULL ) {
- return LDAP_SUCCESS;
- }
+ LDAPControl **ctrls = op->o_ctrls;
- if ( be->be_controls == NULL ) {
- *text = "control unavailable in context";
- return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
- }
+ if( ctrls == NULL ) return LDAP_SUCCESS;
for( ; *ctrls != NULL ; ctrls++ ) {
if( (*ctrls)->ldctl_iscritical &&