From 2ee7e831f2e5dbd41a61b92eaccf20aa9e17145f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 27 Nov 2006 05:32:35 +0000 Subject: r19911: talloc_apsrintf is not really required here its faster this way (another 2-4%s) (This used to be commit 8bbbfa3467c00543b0b330aec14e22b7e796fea7) --- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4') 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; } -- cgit