aboutsummaryrefslogtreecommitdiff
path: root/src/gdbmtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdbmtool.c')
-rw-r--r--src/gdbmtool.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gdbmtool.c b/src/gdbmtool.c
index f9a4924..f439207 100644
--- a/src/gdbmtool.c
+++ b/src/gdbmtool.c
@@ -788,17 +788,11 @@ print_dir_begin (struct handler_param *param GDBM_ARG_UNUSED, size_t *exp_count)
static size_t
bucket_count (void)
{
- int i;
- off_t last = 0;
size_t count = 0;
-
- for (i = 0; i < GDBM_DIR_COUNT (gdbm_file); i++)
+
+ if (gdbm_bucket_count (gdbm_file, &count))
{
- if (gdbm_file->dir[i] != last)
- {
- ++count;
- last = gdbm_file->dir[i];
- }
+ terror ("gdbm_bucket_count: %s", gdbm_strerror (gdbm_errno));
}
return count;
}

Return to:

Send suggestions and report system problems to the System administrator.