diff options
author | Jeremy Allison <jra@samba.org> | 2001-12-11 08:31:58 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-12-11 08:31:58 +0000 |
commit | 9bb0a964bfd8e016cbd187c3943ba6fdfaf4d65b (patch) | |
tree | 6a6e8934a99e216aea60d3bd0abcc4bd58f9258a | |
parent | dd324a535762696f6bbf09bf6a344ea87c379b0a (diff) | |
download | samba-9bb0a964bfd8e016cbd187c3943ba6fdfaf4d65b.tar.gz samba-9bb0a964bfd8e016cbd187c3943ba6fdfaf4d65b.tar.bz2 samba-9bb0a964bfd8e016cbd187c3943ba6fdfaf4d65b.zip |
Fix up warnings. Make tdb_openXX() names const.
Jeremy.
(This used to be commit 9e3581827d91f5fd33fabd5ad4c9a79d63355731)
-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; } |