summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing_migrate.c6
-rw-r--r--source3/printing/nt_printing_tdb.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/printing/nt_printing_migrate.c b/source3/printing/nt_printing_migrate.c
index f6c4ef2d8b..ec66dfe816 100644
--- a/source3/printing/nt_printing_migrate.c
+++ b/source3/printing/nt_printing_migrate.c
@@ -532,7 +532,7 @@ static NTSTATUS migrate_internal(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *pipe_hnd)
{
const char *backup_suffix = ".bak";
- TDB_DATA kbuf, newkey, dbuf;
+ TDB_DATA kbuf, dbuf;
TDB_CONTEXT *tdb;
NTSTATUS status;
int rc;
@@ -549,9 +549,9 @@ static NTSTATUS migrate_internal(TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_SUCH_FILE;
}
- for (kbuf = tdb_firstkey(tdb);
+ for (kbuf = tdb_firstkey_compat(tdb);
kbuf.dptr;
- newkey = tdb_nextkey(tdb, kbuf), free(kbuf.dptr), kbuf = newkey)
+ kbuf = tdb_nextkey_compat(tdb, kbuf))
{
dbuf = tdb_fetch_compat(tdb, kbuf);
if (!dbuf.dptr) {
diff --git a/source3/printing/nt_printing_tdb.c b/source3/printing/nt_printing_tdb.c
index 1361f4b3b3..e703fee678 100644
--- a/source3/printing/nt_printing_tdb.c
+++ b/source3/printing/nt_printing_tdb.c
@@ -88,12 +88,12 @@ static TDB_DATA make_printers_secdesc_tdbkey(TALLOC_CTX *ctx,
static bool upgrade_to_version_3(void)
{
- TDB_DATA kbuf, newkey, dbuf;
+ TDB_DATA kbuf, dbuf;
DEBUG(0,("upgrade_to_version_3: upgrading print tdb's to version 3\n"));
- for (kbuf = tdb_firstkey(tdb_drivers); kbuf.dptr;
- newkey = tdb_nextkey(tdb_drivers, kbuf), free(kbuf.dptr), kbuf=newkey) {
+ for (kbuf = tdb_firstkey_compat(tdb_drivers); kbuf.dptr;
+ kbuf = tdb_nextkey_compat(tdb_drivers, kbuf)) {
dbuf = tdb_fetch_compat(tdb_drivers, kbuf);