summaryrefslogtreecommitdiff
path: root/lib/tdb/common/rescue.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-12-20 16:36:02 +0100
committerStefan Metzmacher <metze@samba.org>2013-02-05 13:18:28 +0100
commit72cd5d5ff664dc46afb3dd6a5ea45a28ef7b8591 (patch)
tree345e21bb28f13b724fa9ec8ff28b266a2c06ec79 /lib/tdb/common/rescue.c
parent71247ec4bdefb3a1b16619f7ea7404bcbafb5b60 (diff)
downloadsamba-72cd5d5ff664dc46afb3dd6a5ea45a28ef7b8591.tar.gz
samba-72cd5d5ff664dc46afb3dd6a5ea45a28ef7b8591.tar.bz2
samba-72cd5d5ff664dc46afb3dd6a5ea45a28ef7b8591.zip
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 <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Feb 5 13:18:28 CET 2013 on sn-devel-104
Diffstat (limited to 'lib/tdb/common/rescue.c')
-rw-r--r--lib/tdb/common/rescue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tdb/common/rescue.c b/lib/tdb/common/rescue.c
index 03ae8d6ae5..17e7ed8545 100644
--- a/lib/tdb/common/rescue.c
+++ b/lib/tdb/common/rescue.c
@@ -57,7 +57,7 @@ static bool looks_like_valid_record(struct tdb_context *tdb,
return false;
/* Next pointer must make some sense. */
- if (rec->next > 0 && rec->next < TDB_DATA_START(tdb->header.hash_size))
+ if (rec->next > 0 && rec->next < TDB_DATA_START(tdb->hash_size))
return false;
if (tdb->methods->tdb_oob(tdb, rec->next, sizeof(*rec), 1))
@@ -234,7 +234,7 @@ _PUBLIC_ int tdb_rescue(struct tdb_context *tdb,
tdb->log.log_fn = logging_suppressed;
/* Now walk entire db looking for records. */
- for (off = TDB_DATA_START(tdb->header.hash_size);
+ for (off = TDB_DATA_START(tdb->hash_size);
off < tdb->map_size;
off += TDB_ALIGNMENT) {
if (tdb->methods->tdb_read(tdb, off, &rec, sizeof(rec),
@@ -249,7 +249,7 @@ _PUBLIC_ int tdb_rescue(struct tdb_context *tdb,
}
/* Walk hash chains to positive vet. */
- for (h = 0; h < 1+tdb->header.hash_size; h++) {
+ for (h = 0; h < 1+tdb->hash_size; h++) {
bool slow_chase = false;
tdb_off_t slow_off = FREELIST_TOP + h*sizeof(tdb_off_t);