From 72cd5d5ff664dc46afb3dd6a5ea45a28ef7b8591 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 20 Dec 2012 16:36:02 +0100 Subject: tdb: Remove "header" from tdb_context header.hash_size was the only thing we ever referenced outside of tdb_open_ex and its direct callees. So this shrinks the tdb_context by 164 bytes. Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue Feb 5 13:18:28 CET 2013 on sn-devel-104 --- lib/tdb/common/transaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/tdb/common/transaction.c') diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c index ee9beeb3d3..42289fd0f6 100644 --- a/lib/tdb/common/transaction.c +++ b/lib/tdb/common/transaction.c @@ -371,7 +371,7 @@ static int transaction_write_existing(struct tdb_context *tdb, tdb_off_t off, static void transaction_next_hash_chain(struct tdb_context *tdb, uint32_t *chain) { uint32_t h = *chain; - for (;h < tdb->header.hash_size;h++) { + for (;h < tdb->hash_size;h++) { /* the +1 takes account of the freelist */ if (0 != tdb->transaction->hash_heads[h+1]) { break; @@ -495,7 +495,7 @@ static int _tdb_transaction_start(struct tdb_context *tdb, /* setup a copy of the hash table heads so the hash scan in traverse can be fast */ tdb->transaction->hash_heads = (uint32_t *) - calloc(tdb->header.hash_size+1, sizeof(uint32_t)); + calloc(tdb->hash_size+1, sizeof(uint32_t)); if (tdb->transaction->hash_heads == NULL) { tdb->ecode = TDB_ERR_OOM; goto fail; -- cgit