diff options
| author | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-10 13:59:34 -0700 |
|---|---|---|
| committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-11 15:51:48 -0700 |
| commit | f111e228dd01c2271d73518cb4e52eddacda8de8 (patch) | |
| tree | 06dc74fd8aaf637e463b49add6defc0cf49781f4 | |
| parent | ed71757020a088a526e1fcd35cc44137697f3cb3 (diff) | |
| download | ds-f111e228dd01c2271d73518cb4e52eddacda8de8.tar.gz ds-f111e228dd01c2271d73518cb4e52eddacda8de8.tar.xz ds-f111e228dd01c2271d73518cb4e52eddacda8de8.zip | |
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.
| -rw-r--r-- | ldap/servers/plugins/replication/repl5_inc_protocol.c | 5 |
1 files 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)"); |
