static void *_tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset,
tdb_len_t len, unsigned int prefix)
{
- void *buf;
+ unsigned char *buf;
enum TDB_ERROR ecode;
/* some systems don't like zero length malloc */
const void *tdb_access_read(struct tdb_context *tdb,
tdb_off_t off, tdb_len_t len, bool convert)
{
- const void *ret = NULL;
+ void *ret = NULL;
if (likely(!(tdb->flags & TDB_CONVERT))) {
ret = tdb->methods->direct(tdb, off, len, false);
}
}
-void add_stat_(struct tdb_context *tdb, uint64_t *s, size_t val)
-{
- if ((uintptr_t)s < (uintptr_t)tdb->stats + tdb->stats->size)
- *s += val;
-}
-
static const struct tdb_methods io_methods = {
tdb_read,
tdb_write,