From f77708e96268d18abbfb038f4e78fe9e11a2856f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 13 Sep 2010 19:59:18 +0930 Subject: tdb: fix tdb_check() on other-endian tdbs. We must not endian-convert the magic string, just the rest. Signed-off-by: Rusty Russell --- lib/tdb/common/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tdb/common/check.c b/lib/tdb/common/check.c index 3ac2eb5105..fd3c0a91f3 100644 --- a/lib/tdb/common/check.c +++ b/lib/tdb/common/check.c @@ -29,7 +29,7 @@ static bool tdb_check_header(struct tdb_context *tdb, tdb_off_t *recovery) { struct tdb_header hdr; - if (tdb->methods->tdb_read(tdb, 0, &hdr, sizeof(hdr), DOCONV()) == -1) + if (tdb->methods->tdb_read(tdb, 0, &hdr, sizeof(hdr), 0) == -1) return false; if (strcmp(hdr.magic_food, TDB_MAGIC_FOOD) != 0) goto corrupt; -- cgit