Tuesday, February 13, 2018

[389-commits] [389-ds-base] 01/01: fix compiler warning for const csn, caused by previous fix for t 49551

This is an automated email from the git hooks/post-receive script.

lkrispen pushed a commit to branch 389-ds-base-1.3.7
in repository 389-ds-base.

commit ce3231b9f7e5a0ef6392cbb9659c6312557d9e0c
Author: Ludwig Krispenz <lkrispen@redhat.com>
Date: Tue Feb 13 12:23:50 2018 +0100

fix compiler warning for const csn, caused by previous fix for t 49551
---
ldap/servers/plugins/replication/repl5_replica.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
index c6d6ee7..62bd84e 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -3001,7 +3001,7 @@ process_reap_entry(Slapi_Entry *entry, void *cb_data)
if the value is set in the replica, we will know about it immediately */
PRBool *tombstone_reap_stop = ((reap_callback_data *)cb_data)->tombstone_reap_stop;
const CSN *deletion_csn = NULL;
- int deletion_csn_free = 0;
+ CSN *tombstone_csn = NULL;
int rc = -1;

/* abort reaping if we've been told to stop or we're shutting down */
@@ -3021,11 +3021,11 @@ process_reap_entry(Slapi_Entry *entry, void *cb_data)
/* this might be a tombstone which was directly added, eg a cenotaph
* check if a tombstonecsn exist and use it
*/
- char *tombstonecsn = slapi_entry_attr_get_charptr(entry, SLAPI_ATTR_TOMBSTONE_CSN);
- if (tombstonecsn) {
- deletion_csn = csn_new_by_string(tombstonecsn);
- deletion_csn_free = 1;
- slapi_ch_free_string(&tombstonecsn);
+ char *tombstonecsn_str = slapi_entry_attr_get_charptr(entry, SLAPI_ATTR_TOMBSTONE_CSN);
+ if (tombstonecsn_str) {
+ tombstone_csn = csn_new_by_string(tombstonecsn_str);
+ deletion_csn = tombstone_csn;
+ slapi_ch_free_string(&tombstonecsn_str);
}
}

@@ -3057,8 +3057,8 @@ process_reap_entry(Slapi_Entry *entry, void *cb_data)
/* Don't update the count for the database tombstone entry */
(*num_entriesp)++;
}
- if (deletion_csn_free) {
- csn_free(&deletion_csn);
+ if (tombstone_csn) {
+ csn_free(&tombstone_csn);
}

return 0;

--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org

No comments:

Post a Comment