From: Rusty Russell Date: Thu, 17 Mar 2011 11:42:21 +0000 (+1030) Subject: tdb2: fix two bogus returns in check.c X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=0cbedc52e54c8700c29907154c140a43f9773e2c;hp=751a8a34d06dde243c9f273427ef262c25fbe11f tdb2: fix two bogus returns in check.c Two missed cases in b21004624683 (tdb2: change API to return the error value.) --- diff --git a/ccan/tdb2/check.c b/ccan/tdb2/check.c index de1cb98b..6fdfac36 100644 --- a/ccan/tdb2/check.c +++ b/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, used, num_used, num_found, check, private_data); if (ecode != TDB_SUCCESS) { - return false; + return ecode; } 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); if (ecode != TDB_SUCCESS) { - return false; + return ecode; } /* FIXME: Check hash bits */