diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-06-20 18:40:32 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-06-20 11:18:35 +0200 |
commit | 3a8faefd6625db45e11c775a77413b35189e2ba9 (patch) | |
tree | 2297ffd8f2d7511d766604008de88a3c45bfd9db /source3/printing/nt_printing_tdb.c | |
parent | 2c71e8596b295e7080eb936db705f452e1d7b9d9 (diff) | |
download | samba-3a8faefd6625db45e11c775a77413b35189e2ba9.tar.gz |
tdb_compat: use tdb_firstkey_compat/tdb_nextkey_compat everywhere.
Note that tdb_nextkey_compat frees the old key for us.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/printing/nt_printing_tdb.c')
-rw-r--r-- | source3/printing/nt_printing_tdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/printing/nt_printing_tdb.c b/source3/printing/nt_printing_tdb.c index 1361f4b3b36..e703fee678f 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); |