#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "odb.h"
Go to the source code of this file.
Functions | |
static int | check_circular_list (odb_data_t const *data) |
static int | check_redundant_key (odb_data_t const *data, odb_key_t max) |
int | odb_check_hash (odb_t const *odb) |
Debug routines for libdb
Definition in file db_debug.c.
static int check_circular_list | ( | odb_data_t const * | data | ) | [static] |
Definition at line 17 of file db_debug.c.
References BUCKET_FACTOR, odb_descr_t::current_size, odb_data::descr, odb_data::hash_base, odb_node_t::next, odb_data::node_base, and odb_descr_t::size.
Referenced by odb_check_hash().
static int check_redundant_key | ( | odb_data_t const * | data, | |
odb_key_t | max | |||
) | [static] |
Definition at line 69 of file db_debug.c.
References odb_descr_t::current_size, odb_data::descr, odb_node_t::key, and odb_data::node_base.
Referenced by odb_check_hash().
int odb_check_hash | ( | odb_t const * | odb | ) |
check that the hash is well built
Definition at line 90 of file db_debug.c.
References BUCKET_FACTOR, check_circular_list(), check_redundant_key(), odb_descr_t::current_size, odb_t::data, odb_data::descr, odb_data::hash_base, odb_node_t::key, odb_node_t::next, odb_data::node_base, and odb_descr_t::size.
Referenced by sanity_check(), and test().