diff options
Diffstat (limited to 'lib/tdb/common/summary.c')
-rw-r--r-- | lib/tdb/common/summary.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tdb/common/summary.c b/lib/tdb/common/summary.c index 82572616e4..f4e6d2c7b4 100644 --- a/lib/tdb/common/summary.c +++ b/lib/tdb/common/summary.c @@ -116,7 +116,7 @@ _PUBLIC_ char *tdb_summary(struct tdb_context *tdb) tally_init(&hash); tally_init(&uncoal); - for (off = TDB_DATA_START(tdb->header.hash_size); + for (off = TDB_DATA_START(tdb->hash_size); off < tdb->map_size - 1; off += sizeof(rec) + rec.rec_len) { if (tdb->methods->tdb_read(tdb, off, &rec, sizeof(rec), @@ -159,7 +159,7 @@ _PUBLIC_ char *tdb_summary(struct tdb_context *tdb) if (unc > 1) tally_add(&uncoal, unc - 1); - for (off = 0; off < tdb->header.hash_size; off++) + for (off = 0; off < tdb->hash_size; off++) tally_add(&hash, get_hash_length(tdb, off)); /* 20 is max length of a %zu. */ @@ -190,7 +190,7 @@ _PUBLIC_ char *tdb_summary(struct tdb_context *tdb) (keys.num + freet.num + dead.num) * (sizeof(struct tdb_record) + sizeof(uint32_t)) * 100.0 / tdb->map_size, - tdb->header.hash_size * sizeof(tdb_off_t) + tdb->hash_size * sizeof(tdb_off_t) * 100.0 / tdb->map_size); unlock: |