r19911: talloc_apsrintf is not really required here
authorSimo Sorce <idra@samba.org>
Mon, 27 Nov 2006 05:32:35 +0000 (05:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:28:36 +0000 (14:28 -0500)
its faster this way (another 2-4%s)

source/lib/ldb/ldb_tdb/ldb_tdb.c

index 9b05d98a66e666b3fa78a39dd1d4e47ac6a36fba..bf90115f5142d6102ebf6578d0dd4849e9682cbf 100644 (file)
@@ -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;
        }