amoralej / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 years ago
Clone
Blob Blame History Raw
From b1cc97c13bbbcaa6a3c217d285283203809fa90b Mon Sep 17 00:00:00 2001
From: Thierry Bordaz <tbordaz@redhat.com>
Date: Tue, 16 Oct 2018 10:49:29 +0200
Subject: [PATCH] Ticket 49915 - fix compiler warnings

---
 ldap/servers/slapd/back-ldbm/idl_new.c | 2 +-
 ldap/servers/slapd/back-ldbm/index.c   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ldap/servers/slapd/back-ldbm/idl_new.c b/ldap/servers/slapd/back-ldbm/idl_new.c
index 102265c47..81172f590 100644
--- a/ldap/servers/slapd/back-ldbm/idl_new.c
+++ b/ldap/servers/slapd/back-ldbm/idl_new.c
@@ -379,7 +379,7 @@ idl_new_range_fetch(
             bck_info.index = SLAPI_ATTR_PARENTID;
             bck_info.key = "0";
 
-            if (rc = slapi_back_get_info(be, BACK_INFO_INDEX_KEY, (void **)&bck_info)) {
+            if ((rc = slapi_back_get_info(be, BACK_INFO_INDEX_KEY, (void **)&bck_info))) {
                 slapi_log_err(SLAPI_LOG_WARNING, "idl_new_range_fetch", "Total update: fail to retrieve suffix entryID, continue assuming it is the first entry\n");
             }
             if (bck_info.key_found) {
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
index dea6e9a3e..f0b969ff4 100644
--- a/ldap/servers/slapd/back-ldbm/index.c
+++ b/ldap/servers/slapd/back-ldbm/index.c
@@ -1262,7 +1262,7 @@ set_suffix_key(Slapi_Backend *be, struct _back_info_index_key *info)
     /* Start a txn */
     li = (struct ldbminfo *)be->be_database->plg_private;
     dblayer_txn_init(li, &txn);
-    if (rc = dblayer_txn_begin(be, txn.back_txn_txn, &txn)) {
+    if ((rc = dblayer_txn_begin(be, txn.back_txn_txn, &txn))) {
         slapi_log_err(SLAPI_LOG_ERR, "set_suffix_key", "Fail to update %s index with  %s/%d (key/ID): txn begin fails\n",
                   info->index, info->key, info->id);
         return rc;
@@ -1272,7 +1272,7 @@ set_suffix_key(Slapi_Backend *be, struct _back_info_index_key *info)
     sv_key[1] = NULL;
     slapi_value_init_string(sv_key[0], info->key);
 
-    if (rc = index_addordel_values_sv(be, info->index, sv_key, NULL, info->id, BE_INDEX_ADD, &txn)) {
+    if ((rc = index_addordel_values_sv(be, info->index, sv_key, NULL, info->id, BE_INDEX_ADD, &txn))) {
         value_done(sv_key[0]);
         dblayer_txn_abort(be, &txn);
         slapi_log_err(SLAPI_LOG_ERR, "set_suffix_key", "Fail to update %s index with  %s/%d (key/ID): index_addordel_values_sv fails\n",
@@ -1281,7 +1281,7 @@ set_suffix_key(Slapi_Backend *be, struct _back_info_index_key *info)
     }
 
     value_done(sv_key[0]);
-    if (rc = dblayer_txn_commit(be, &txn)) {
+    if ((rc = dblayer_txn_commit(be, &txn))) {
         slapi_log_err(SLAPI_LOG_ERR, "set_suffix_key", "Fail to update %s index with  %s/%d (key/ID): commit fails\n",
                   info->index, info->key, info->id);
         return rc;
-- 
2.17.2