]> git.sur5r.net Git - openldap/commitdiff
Cleanup
authorHoward Chu <hyc@openldap.org>
Fri, 31 Mar 2006 12:53:32 +0000 (12:53 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 31 Mar 2006 12:53:32 +0000 (12:53 +0000)
servers/slapd/back-bdb/id2entry.c
servers/slapd/component.c
servers/slapd/connection.c
servers/slapd/repl.c
servers/slapd/value.c

index f362739185eac099f3f190bc56105f847879357f..869c217aad1899c20290640f3c02a15d792a7bf2 100644 (file)
@@ -258,9 +258,8 @@ int bdb_entry_release(
 #endif
                }
                /* free entry and reader or writer lock */
-               if ( op ) {
-                       boi = (struct bdb_op_info *)op->o_private;
-               }
+               boi = (struct bdb_op_info *)op->o_private;
+
                /* lock is freed with txn */
                if ( !boi || boi->boi_txn ) {
                        bdb_unlocked_cache_return_entry_rw( &bdb->bi_cache, e, rw );
index 67693a61ac60419e8062e21e80aa9ea47f584736..3a6ae67d8995041fad879a2974d4b2fb20c9a88a 100644 (file)
@@ -179,7 +179,7 @@ dup_comp_ref ( Operation* op, ComponentReference* cr )
                ci_curr = ci_curr->ci_next, ci_temp = &(*ci_temp)->ci_next )
        {
                *ci_temp = op->o_tmpalloc( sizeof( ComponentId ), op->o_tmpmemctx );
-               if ( !ci_temp ) return NULL;
+               if ( !*ci_temp ) return NULL;
                **ci_temp = *ci_curr;
        }
 
index be3fca041bd96f65cd7cab6e656d21ee40b9827d..b0b5ab2ba0934697f4ba702da78509b4aef2c646 100644 (file)
@@ -437,8 +437,6 @@ static Connection* connection_get( ber_socket_t s )
        assert( MCA_conn_check( s ) );
        c = MCA_GET_CONNECTION(s);
 
-       assert( c->c_struct_state != SLAP_C_UNINITIALIZED );
-
 #else
        c = NULL;
        {
@@ -475,6 +473,8 @@ static Connection* connection_get( ber_socket_t s )
        if( c != NULL ) {
                ber_socket_t    sd;
 
+               assert( c->c_struct_state != SLAP_C_UNINITIALIZED );
+
                ldap_pvt_thread_mutex_lock( &c->c_mutex );
 
                ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_GET_FD, &sd );
index 270f9a11f34ae540e31964b35a2b7051b833a1b8..ebdf6267b847aaed1e16c5dc0d4832681c3ff40c 100644 (file)
@@ -398,7 +398,7 @@ replog1(
                                                                fprintf( fp, "%s: %s\n", did, type );
                                                                first = 0;
                                                        }
-                                                       vals[0] = a->a_nvals[i];
+                                                       vals[0] = ml->sml_values[i];
                                                        print_vals( fp, &ml->sml_desc->ad_cname, vals );
                                                        ocs = 2;
                                                }
index 4afb5e640150282d2049aa290750bda2b41db758..83aab3e42a16bce960db6114949d197220e241eb 100644 (file)
@@ -236,7 +236,7 @@ int value_find_ex(
        {
                rc = (mr->smr_normalize)(
                        flags & (SLAP_MR_TYPE_MASK|SLAP_MR_SUBTYPE_MASK|SLAP_MR_VALUE_OF_SYNTAX),
-                       ad ? ad->ad_type->sat_syntax : NULL,
+                       ad->ad_type->sat_syntax,
                        mr, val, &nval, ctx );
 
                if( rc != LDAP_SUCCESS ) {