}
if ( a->a_flags & SLAP_ATTR_SORTED_VALS ) {
- /* Binary search */
+ /* Binary search */
unsigned base = 0, n = a->a_numvals;
- int val = 0;
while ( 0 < n ) {
unsigned pivot = n >> 1;
if ( BER_BVISNULL( &be->be_nsuffix[ c ] ) ) {
Debug( LDAP_DEBUG_ANY, "%s: line %d: "
- "%s: line %d: <suffix> \"%s\" must be within the database naming context, in "
+ "<suffix> \"%s\" must be within the database naming context, in "
"\"suffixMassage <suffix> <massaged suffix>\"\n",
fname, lineno, pvnc.bv_val );
free( pvnc.bv_val );
op2.ors_slimit = 1;
op2.ors_tlimit = SLAP_NO_LIMIT;
- op2.ors_filter = slap_filter_objectClass_pres;
+ op2.ors_filter = (Filter *)slap_filter_objectClass_pres;
op2.ors_filterstr = *slap_filterstr_objectClass_pres;
op2.o_callback = &cb2;
struct backsql_api *ba_next;
} backsql_api;
-#ifdef BACKSQL_ARBITRARY_KEY
-#define BACKSQL_ENTRYID_INIT { BER_BVNULL, BER_BVNULL, 0, BER_BVNULL, BER_BVNULL, NULL }
-#else /* ! BACKSQL_ARBITRARY_KEY */
-#define BACKSQL_ENTRYID_INIT { 0, 0, 0, BER_BVNULL, BER_BVNULL, NULL }
-#endif /* BACKSQL_ARBITRARY_KEY */
-
/*
* "structural" objectClass mapping structure
*/
struct backsql_entryID *eid_next;
} backsql_entryID;
+#ifdef BACKSQL_ARBITRARY_KEY
+#define BACKSQL_ENTRYID_INIT { BER_BVNULL, BER_BVNULL, 0, NULL, BER_BVNULL, BER_BVNULL, NULL }
+#else /* ! BACKSQL_ARBITRARY_KEY */
+#define BACKSQL_ENTRYID_INIT { 0, 0, 0, NULL, BER_BVNULL, BER_BVNULL, NULL }
+#endif /* BACKSQL_ARBITRARY_KEY */
+
/* the function must collect the entry associated to nbase */
#define BACKSQL_ISF_GET_ID 0x1U
#define BACKSQL_ISF_GET_ENTRY ( 0x2U | BACKSQL_ISF_GET_ID )
backsql_tree_delete_search_cb( Operation *op, SlapReply *rs )
{
if ( rs->sr_type == REP_SEARCH ) {
- backsql_info *bi = (backsql_info*)op->o_bd->be_private;
backsql_tree_delete_t *btd;
backsql_entryID *eid;
op2.ors_deref = LDAP_DEREF_NEVER;
op2.ors_slimit = SLAP_NO_LIMIT;
op2.ors_tlimit = SLAP_NO_LIMIT;
- op2.ors_filter = slap_filter_objectClass_pres;
+ op2.ors_filter = (Filter *)slap_filter_objectClass_pres;
op2.ors_filterstr = *slap_filterstr_objectClass_pres;
op2.ors_attrs = slap_anlist_all_attributes;
op2.ors_attrsonly = 0;
int
backsql_delete( Operation *op, SlapReply *rs )
{
- backsql_info *bi = (backsql_info*)op->o_bd->be_private;
SQLHDBC dbh = SQL_NULL_HDBC;
SQLHSTMT sth = SQL_NULL_HSTMT;
backsql_oc_map_rec *oc = NULL;
if ( a != NULL ) {
MatchingRule *mr;
struct berval *cvals;
- int rc, i, j, p;
+ int rc, i, p;
unsigned flags;
mr = mod->sm_desc->ad_type->sat_equality;
case PC_SIZELIMIT:
qc->q_sizelimit = rs->sr_nentries;
break;
+ default:
+ assert( 0 );
+ break;
}
ldap_pvt_thread_rdwr_wunlock(&qc->rwlock);
ldap_pvt_thread_mutex_lock(&cm->cache_mutex);
}
/* Every 64 entries, check for thread pool pause */
- if (( rs->sr_nentries & 0x3f == 0x3f ) &&
+ if ( ( ( rs->sr_nentries & 0x3f ) == 0x3f ) &&
ldap_pvt_thread_pool_query( &connection_pool,
- LDAP_PVT_THREAD_POOL_PARAM_PAUSING, &i ) == 0 && i ) {
+ LDAP_PVT_THREAD_POOL_PARAM_PAUSING, &i ) == 0 && i )
+ {
return LDAP_BUSY;
}
int slapi_attr_value_find( const Slapi_Attr *a, struct berval *v )
{
int rc;
- int ret;
if ( a ->a_vals == NULL ) {
return -1;