From: Tim Beale Date: Thu, 10 Jan 2019 01:25:06 +0000 (+1300) Subject: ldb: Rename variable X-Git-Tag: ldb-1.6.1~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57a565b2fd680fc1a34f4ab91c6f6314f68ef67f;p=thirdparty%2Fsamba.git ldb: Rename variable The old name confused me because it's not really related to the one-level index at all. It's the result from evaluating the indexed search specified in the ac->tree. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13762 Signed-off-by: Tim Beale Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c index d8bdf61fc1b..9a4a0db7e74 100644 --- a/lib/ldb/ldb_key_value/ldb_kv_index.c +++ b/lib/ldb/ldb_key_value/ldb_kv_index.c @@ -2041,15 +2041,15 @@ int ldb_kv_search_indexed(struct ldb_kv_context *ac, uint32_t *match_count) * fast enough in the small case. */ if (ldb_kv->cache->GUID_index_attribute != NULL) { - struct dn_list *idx_one_tree_list + struct dn_list *indexed_search_result = talloc_zero(ac, struct dn_list); - if (idx_one_tree_list == NULL) { + if (indexed_search_result == NULL) { talloc_free(dn_list); return ldb_module_oom(ac->module); } if (!ldb_kv->cache->attribute_indexes) { - talloc_free(idx_one_tree_list); + talloc_free(indexed_search_result); talloc_free(dn_list); return LDB_ERR_OPERATIONS_ERROR; } @@ -2058,13 +2058,14 @@ int ldb_kv_search_indexed(struct ldb_kv_context *ac, uint32_t *match_count) * Try to do an indexed database search */ ret = ldb_kv_index_dn( - ac->module, ldb_kv, ac->tree, idx_one_tree_list); + ac->module, ldb_kv, ac->tree, + indexed_search_result); /* * We can stop if we're sure the object doesn't exist */ if (ret == LDB_ERR_NO_SUCH_OBJECT) { - talloc_free(idx_one_tree_list); + talloc_free(indexed_search_result); talloc_free(dn_list); return LDB_ERR_NO_SUCH_OBJECT; } @@ -2087,8 +2088,8 @@ int ldb_kv_search_indexed(struct ldb_kv_context *ac, uint32_t *match_count) if (!list_intersect(ldb, ldb_kv, dn_list, - idx_one_tree_list)) { - talloc_free(idx_one_tree_list); + indexed_search_result)) { + talloc_free(indexed_search_result); talloc_free(dn_list); return LDB_ERR_OPERATIONS_ERROR; }