diff options
-rw-r--r-- | source3/tdb/tdb.c | 4 | ||||
-rw-r--r-- | source3/tdb/tdb.h | 4 | ||||
-rw-r--r-- | source3/tdb/tdbtorture.c | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index 07568dca9e..ec5565a40f 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -1397,14 +1397,14 @@ static int tdb_already_open(dev_t device, try to call tdb_error or tdb_errname, just do strerror(errno). @param name may be NULL for internal databases. */ -TDB_CONTEXT *tdb_open(char *name, int hash_size, int tdb_flags, +TDB_CONTEXT *tdb_open(const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode) { return tdb_open_ex(name, hash_size, tdb_flags, open_flags, mode, NULL); } -TDB_CONTEXT *tdb_open_ex(char *name, int hash_size, int tdb_flags, +TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode, tdb_log_func log_fn) { diff --git a/source3/tdb/tdb.h b/source3/tdb/tdb.h index e3eab41fd6..6877e5cdf4 100644 --- a/source3/tdb/tdb.h +++ b/source3/tdb/tdb.h @@ -101,9 +101,9 @@ typedef struct tdb_context { typedef int (*tdb_traverse_func)(TDB_CONTEXT *, TDB_DATA, TDB_DATA, void *); typedef void (*tdb_log_func)(TDB_CONTEXT *, int , const char *, ...); -TDB_CONTEXT *tdb_open(char *name, int hash_size, int tdb_flags, +TDB_CONTEXT *tdb_open(const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode); -TDB_CONTEXT *tdb_open_ex(char *name, int hash_size, int tdb_flags, +TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode, tdb_log_func log_fn); diff --git a/source3/tdb/tdbtorture.c b/source3/tdb/tdbtorture.c index 66c424c355..c4d912a147 100644 --- a/source3/tdb/tdbtorture.c +++ b/source3/tdb/tdbtorture.c @@ -67,11 +67,11 @@ static char *randbuf(int len) return buf; } -static int cull_traverse(TDB_CONTEXT *db, TDB_DATA key, TDB_DATA dbuf, +static int cull_traverse(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state) { if (random() % CULL_PROB == 0) { - tdb_delete(db, key); + tdb_delete(tdb, key); } return 0; } @@ -151,10 +151,10 @@ next: free(s); } -static int traverse_fn(TDB_CONTEXT *db, TDB_DATA key, TDB_DATA dbuf, +static int traverse_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state) { - tdb_delete(db, key); + tdb_delete(tdb, key); return 0; } |