summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-11-27 05:32:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:36 -0500
commit2ee7e831f2e5dbd41a61b92eaccf20aa9e17145f (patch)
tree2d2c87d35036a5ce26c2371476a5be2c9dbc88a1 /source4/lib/ldb/ldb_tdb
parent921a596cd47c5ecdf40e9dea1754227418e9e13f (diff)
downloadsamba-2ee7e831f2e5dbd41a61b92eaccf20aa9e17145f.tar.gz
samba-2ee7e831f2e5dbd41a61b92eaccf20aa9e17145f.tar.bz2
samba-2ee7e831f2e5dbd41a61b92eaccf20aa9e17145f.zip
r19911: talloc_apsrintf is not really required here
its faster this way (another 2-4%s) (This used to be commit 8bbbfa3467c00543b0b330aec14e22b7e796fea7)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 9b05d98a66..bf90115f51 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -142,8 +142,12 @@ struct TDB_DATA ltdb_key(struct ldb_module *module, struct ldb_dn *dn)
goto failed;
}
- key_str = talloc_asprintf(ldb, "DN=%s", dn_folded);
+ key_str = talloc_strdup(ldb, "DN=");
+ if (!key_str) {
+ goto failed;
+ }
+ key_str = talloc_append_string(ldb, key_str, dn_folded);
if (!key_str) {
goto failed;
}