s4/dsdb/schema: Fix 'Value stored to 'ret' is never read'
authorNoel Power <noel.power@suse.com>
Wed, 3 Jul 2019 14:56:55 +0000 (14:56 +0000)
committerNoel Power <npower@samba.org>
Mon, 8 Jul 2019 09:30:10 +0000 (09:30 +0000)
Fixes:

source4/dsdb/schema/schema_set.c:274:3: warning: Value stored to 'ret' is never read <--[clang]
                ret = LDB_SUCCESS;
                ^     ~~~~~~~~~~~
source4/dsdb/schema/schema_set.c:327:3: warning: Value stored to 'ret' is never read <--[clang]
                ret = LDB_SUCCESS;
                ^     ~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source4/dsdb/schema/schema_set.c

index 258cbb81f2520dddb0c3bc573f37d688863242e1..b316686fd032f3af75c26406917163a48460f6c6 100644 (file)
@@ -271,7 +271,6 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb,
                }
                ret = ldb_add(ldb, msg);
        } else {
-               ret = LDB_SUCCESS;
                /* Annoyingly added to our search results */
                ldb_msg_remove_attr(res->msgs[0], "distinguishedName");
 
@@ -324,7 +323,6 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb,
                }
                ret = ldb_add(ldb, msg_idx);
        } else {
-               ret = LDB_SUCCESS;
                /* Annoyingly added to our search results */
                ldb_msg_remove_attr(res_idx->msgs[0], "distinguishedName");