1
0
Эх сурвалжийг харах

610281 - fix coverity Defect Type: Control flow issues

https://bugzilla.redhat.com/show_bug.cgi?id=610281

11805 DEADCODE Triaged Unassigned Bug Minor Ignore
clcache_load_buffer_bulk() ds/ldap/servers/plugins/replication/cl5_clcache.c

Comment:
Experimented the transaction control, but it was not adopted.
383 /* txn control seems not improving anything so turn it off */

Comment out these lines.
418 if ( txn ) {
Execution cannot reach this statement "(*txn->commit)(txn, 256U);".
419 txn->commit ( txn, DB_TXN_NOSYNC );
420 }
Noriko Hosoi 15 жил өмнө
parent
commit
7a5db43cc8

+ 4 - 3
ldap/servers/plugins/replication/cl5_clcache.c

@@ -380,12 +380,11 @@ clcache_load_buffer_bulk ( CLC_Buffer *buf, int flag )
 	DBC *cursor = NULL;
 	int rc;
 
-	/* txn control seems not improving anything so turn it off */
-	/*
+#if 0 /* txn control seems not improving anything so turn it off */
 	if ( *(_pool->pl_dbenv) ) {
 		txn_begin( *(_pool->pl_dbenv), NULL, &txn, 0 );
 	}
-	*/
+#endif
 
 	PR_Lock ( buf->buf_busy_list->bl_lock );
 	if ( 0 == ( rc = clcache_open_cursor ( txn, buf, &cursor )) ) {
@@ -415,9 +414,11 @@ clcache_load_buffer_bulk ( CLC_Buffer *buf, int flag )
 		cursor->c_close ( cursor );
 	}
 
+#if 0 /* txn control seems not improving anything so turn it off */
 	if ( txn ) {
 		txn->commit ( txn, DB_TXN_NOSYNC );
 	}
+#endif
 
 	PR_Unlock ( buf->buf_busy_list->bl_lock );