Browse Source

tdb2: fix two bogus returns in check.c

Two missed cases in b21004624683 (tdb2: change API to return the error
value.)
Rusty Russell 15 years ago
parent
commit
0cbedc52e5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ccan/tdb2/check.c

+ 2 - 2
ccan/tdb2/check.c

@@ -131,7 +131,7 @@ static enum TDB_ERROR check_hash_chain(struct tdb_context *tdb,
 	ecode = check_hash_tree(tdb, off, 0, hash, 64,
 	ecode = check_hash_tree(tdb, off, 0, hash, 64,
 				used, num_used, num_found, check, private_data);
 				used, num_used, num_found, check, private_data);
 	if (ecode != TDB_SUCCESS) {
 	if (ecode != TDB_SUCCESS) {
-		return false;
+		return ecode;
 	}
 	}
 
 
 	off = tdb_read_off(tdb, off + offsetof(struct tdb_chain, next));
 	off = tdb_read_off(tdb, off + offsetof(struct tdb_chain, next));
@@ -526,7 +526,7 @@ static enum TDB_ERROR check_free_table(struct tdb_context *tdb,
 			}
 			}
 			ecode = check_free(tdb, off, &f, prev, ftable_num, i);
 			ecode = check_free(tdb, off, &f, prev, ftable_num, i);
 			if (ecode != TDB_SUCCESS) {
 			if (ecode != TDB_SUCCESS) {
-				return false;
+				return ecode;
 			}
 			}
 
 
 			/* FIXME: Check hash bits */
 			/* FIXME: Check hash bits */