summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-13 02:33:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:29 -0500
commit05cdd9ccafeeb384792b9ce7ca044bcec1bfc839 (patch)
tree5e34e06ecfa90d4248e4d511af80f67636c759ac /source4/lib/ldb/ldb_tdb
parent24fe49a3d10633fa9be5547e89d10be1d5f9ccb1 (diff)
downloadsamba-05cdd9ccafeeb384792b9ce7ca044bcec1bfc839.tar.gz
samba-05cdd9ccafeeb384792b9ce7ca044bcec1bfc839.tar.bz2
samba-05cdd9ccafeeb384792b9ce7ca044bcec1bfc839.zip
r18439: 2nd try at a talloc_move() api. This type with the ** ptr interface
exposed. Unfortunately this generates a large number of type punning warnings. We'll have to find some magic to hide those. (This used to be commit 254cbf09dee5a1e20c47e47a298f1a8d172b41b9)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c8
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index f2816ec1da..59c1645ba8 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -378,7 +378,7 @@ static int list_intersect(struct ldb_context *ldb,
for (i=0;i<list->count;i++) {
if (ldb_list_find(list->dn[i], list2->dn, list2->count,
sizeof(char *), (comparison_fn_t)strcmp) != -1) {
- list3->dn[list3->count] = talloc_move(list3->dn, list->dn[i]);
+ list3->dn[list3->count] = talloc_move(list3->dn, &list->dn[i]);
list3->count++;
} else {
talloc_free(list->dn[i]);
@@ -386,7 +386,7 @@ static int list_intersect(struct ldb_context *ldb,
}
talloc_free(list->dn);
- list->dn = talloc_move(list, list3->dn);
+ list->dn = talloc_move(list, &list3->dn);
list->count = list3->count;
talloc_free(list3);
@@ -486,7 +486,7 @@ static int ltdb_index_dn_or(struct ldb_module *module,
if (ret == -1) {
ret = 1;
- list->dn = talloc_move(list, list2->dn);
+ list->dn = talloc_move(list, &list2->dn);
list->count = list2->count;
} else {
if (list_union(ldb, list, list2) == -1) {
@@ -567,7 +567,7 @@ static int ltdb_index_dn_and(struct ldb_module *module,
if (ret == -1) {
ret = 1;
talloc_free(list->dn);
- list->dn = talloc_move(list, list2->dn);
+ list->dn = talloc_move(list, &list2->dn);
list->count = list2->count;
} else {
if (list_intersect(ldb, list, list2) == -1) {
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index 612ca5c0fe..7cdb2b672f 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -312,7 +312,7 @@ int ltdb_add_attr_results(struct ldb_module *module,
(*res) = res2;
- (*res)[*count] = talloc_move(*res, msg2);
+ (*res)[*count] = talloc_move(*res, &msg2);
(*res)[(*count)+1] = NULL;
(*count)++;