From f111e228dd01c2271d73518cb4e52eddacda8de8 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Tue, 10 Aug 2010 13:59:34 -0700 Subject: Bug 622903 - fix coverity Defect Type: Code maintainability issues https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: Pointer "replica" returned by "object_get_data(prp->replica_object)" (line 826) is never used. In "case STATE_READY_TO_ACQUIRE", Replica object "replica" is not needed. --- ldap/servers/plugins/replication/repl5_inc_protocol.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c index e4c6e2bd..dde91f19 100644 --- a/ldap/servers/plugins/replication/repl5_inc_protocol.c +++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c @@ -626,7 +626,7 @@ repl5_inc_run(Private_Repl_Protocol *prp) int e1; RUV *ruv = NULL; CSN *cons_schema_csn; - Replica *replica; + Replica *replica = NULL; int wait_change_timer_set = 0; time_t last_start_time; PRUint32 num_changes_sent; @@ -823,7 +823,6 @@ repl5_inc_run(Private_Repl_Protocol *prp) /* ONREPL - at this state we unconditionally acquire the replica ignoring all events. Not sure if this is good */ object_acquire(prp->replica_object); - replica = object_get_data(prp->replica_object); rc = acquire_replica(prp, REPL_NSDS50_INCREMENTAL_PROTOCOL_OID, &ruv); use_busy_backoff_timer = PR_FALSE; /* default */ @@ -856,7 +855,7 @@ repl5_inc_run(Private_Repl_Protocol *prp) prp->last_acquire_response_code, NULL); } - object_release(prp->replica_object); replica = NULL; + object_release(prp->replica_object); break; case STATE_BACKOFF_START: dev_debug("repl5_inc_run(STATE_BACKOFF_START)"); -- cgit