diff options
Diffstat (limited to 'src/bucket.c')
-rw-r--r-- | src/bucket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bucket.c b/src/bucket.c index a3e8f4e..4b69bbe 100644 --- a/src/bucket.c +++ b/src/bucket.c @@ -26,13 +26,13 @@ /* Initializing a new hash buckets sets all bucket entries to -1 hash value. */ void _gdbm_new_bucket (GDBM_FILE dbf, hash_bucket *bucket, int bits) { int index; - + /* Initialize the avail block. */ bucket->av_count = 0; /* Set the information fields first. */ bucket->bucket_bits = bits; bucket->count = 0; @@ -143,13 +143,13 @@ _gdbm_get_bucket (GDBM_FILE dbf, int dir_index) } /* Validate the bucket */ bucket = dbf->bucket_cache[lru].ca_bucket; if (!(bucket->count >= 0 && bucket->count <= dbf->header->bucket_elems && bucket->bucket_bits >= 0 - && bucket->bucket_bits <= GDBM_HASH_BITS)) + && bucket->bucket_bits <= dbf->header->dir_bits)) { GDBM_SET_ERRNO (dbf, GDBM_BAD_BUCKET, TRUE); return -1; } /* Validate bucket_avail table */ if (gdbm_bucket_avail_table_validate (dbf, bucket)) |