X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb.c;h=18cf2e93a598ea7c3f742bcb3e445a5985686d55;hp=2a37f13063a4f094162ce3cb6bcd919c342d782e;hb=dc9da1e34fe6a9d113fd57e116ebbc6d5bd54819;hpb=6ce40d6ab4dbd63bd76979b8491351708c3df892 diff --git a/ccan/tdb2/tdb.c b/ccan/tdb2/tdb.c index 2a37f130..18cf2e93 100644 --- a/ccan/tdb2/tdb.c +++ b/ccan/tdb2/tdb.c @@ -38,7 +38,7 @@ static enum TDB_ERROR replace_data(struct tdb_context *tdb, /* We didn't like the existing one: remove it. */ if (old_off) { - add_stat(tdb, frees, 1); + tdb->stats.frees++; ecode = add_free_record(tdb, old_off, sizeof(struct tdb_used_record) + key.dsize + old_room); @@ -285,7 +285,7 @@ enum TDB_ERROR tdb_delete(struct tdb_context *tdb, struct tdb_data key) } /* Free the deleted entry. */ - add_stat(tdb, frees, 1); + tdb->stats.frees++; ecode = add_free_record(tdb, off, sizeof(struct tdb_used_record) + rec_key_length(&rec)