X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Fcheck.c;h=4cd92b43c040a30c40e4e952e05aac5deb0a13e9;hp=afb682f5e74c8869f77a12ca8436f797b5413ff2;hb=0aa58f6e6017138a78ce4e86fb758732719acaca;hpb=1e8fde07b5d6fa50731d914542d72465047521fe diff --git a/ccan/tdb2/check.c b/ccan/tdb2/check.c index afb682f5..4cd92b43 100644 --- a/ccan/tdb2/check.c +++ b/ccan/tdb2/check.c @@ -1,7 +1,7 @@ - /* + /* Trivial Database 2: free list/block handling Copyright (C) Rusty Russell 2010 - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either @@ -277,7 +277,7 @@ static bool check_hash_tree(struct tdb_context *tdb, if (is_subhash(group[b])) { uint64_t subprefix; - subprefix = (hprefix + subprefix = (hprefix << (group_bits + TDB_HASH_GROUP_BITS)) + g * (1 << TDB_HASH_GROUP_BITS) + b; @@ -449,7 +449,7 @@ static bool check_free(struct tdb_context *tdb, } return true; } - + static bool check_free_table(struct tdb_context *tdb, tdb_off_t ftable_off, unsigned ftable_num,