summaryrefslogtreecommitdiff
path: root/source3/tdb/tdb.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-11-09 01:26:13 +0000
committerTim Potter <tpot@samba.org>2001-11-09 01:26:13 +0000
commite91226daea2daeea0a0231763bc9ec7aaa4da5c8 (patch)
tree3fe86afe0c22d5b14887e6193b9f7e3391419009 /source3/tdb/tdb.c
parent55dfb66079333acd8e0aee91c0ee90d0a413a8e6 (diff)
downloadsamba-e91226daea2daeea0a0231763bc9ec7aaa4da5c8.tar.gz
samba-e91226daea2daeea0a0231763bc9ec7aaa4da5c8.tar.bz2
samba-e91226daea2daeea0a0231763bc9ec7aaa4da5c8.zip
Removed #ifdef TDB_DEBUG around tdb_dump_all() and tdb_printfreelist()
so that tdbtool can be compiled without having to make clean. (This used to be commit dad688d8c6b3c98173a846ad833599a4016d2e1a)
Diffstat (limited to 'source3/tdb/tdb.c')
-rw-r--r--source3/tdb/tdb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index d7cd277283..69e36ebd3e 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -394,7 +394,6 @@ static int update_tailer(TDB_CONTEXT *tdb, tdb_off offset,
&totalsize);
}
-#ifdef TDB_DEBUG
static tdb_off tdb_dump_record(TDB_CONTEXT *tdb, tdb_off offset)
{
struct list_struct rec;
@@ -444,7 +443,6 @@ static void tdb_dump_chain(TDB_CONTEXT *tdb, int i)
void tdb_dump_all(TDB_CONTEXT *tdb)
{
- tdb_off off;
int i;
for (i=0;i<tdb->header.hash_size;i++) {
tdb_dump_chain(tdb, i);
@@ -457,7 +455,7 @@ void tdb_printfreelist(TDB_CONTEXT *tdb)
{
long total_free = 0;
tdb_off offset, rec_ptr, last_ptr;
- struct list_struct rec, lastrec, newrec;
+ struct list_struct rec;
tdb_lock(tdb, -1, F_WRLCK);
@@ -486,11 +484,11 @@ void tdb_printfreelist(TDB_CONTEXT *tdb)
/* move to the next record */
rec_ptr = rec.next;
}
- printf("total rec_len = [0x%08x (%d)]\n", total_free, total_free );
+ printf("total rec_len = [0x%08x (%d)]\n", (int)total_free,
+ (int)total_free);
tdb_unlock(tdb, -1, F_WRLCK);
}
-#endif
/* Remove an element from the freelist. Must have alloc lock. */
static int remove_from_freelist(TDB_CONTEXT *tdb, tdb_off off, tdb_off next)