]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/io.c
tdb2: allow multiple chain locks.
[ccan] / ccan / tdb2 / io.c
index 4ed37ca2cffbeaac1c6398ac5dbf20926e6d0d83..240a1c038da368c274363cb3cfcd37945a517a0e 100644 (file)
@@ -342,7 +342,7 @@ enum TDB_ERROR tdb_write_off(struct tdb_context *tdb,
 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 */
@@ -592,12 +592,6 @@ void tdb_inc_seqnum(struct tdb_context *tdb)
        }
 }
 
-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,