summaryrefslogtreecommitdiff
path: root/lib/tdb2/tdb1_transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tdb2/tdb1_transaction.c')
-rw-r--r--lib/tdb2/tdb1_transaction.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tdb2/tdb1_transaction.c b/lib/tdb2/tdb1_transaction.c
index 157642a632..411caef360 100644
--- a/lib/tdb2/tdb1_transaction.c
+++ b/lib/tdb2/tdb1_transaction.c
@@ -1318,7 +1318,7 @@ tdb_bool_err tdb1_needs_recovery(struct tdb_context *tdb)
/* find the recovery area */
if (tdb1_ofs_read(tdb, TDB1_RECOVERY_HEAD, &recovery_head) == -1) {
- return tdb->last_error;
+ return TDB_ERR_TO_OFF(tdb->last_error);
}
if (recovery_head == 0) {
@@ -1329,7 +1329,7 @@ tdb_bool_err tdb1_needs_recovery(struct tdb_context *tdb)
/* read the recovery record */
if (tdb->tdb1.io->tdb1_read(tdb, recovery_head, &rec,
sizeof(rec), TDB1_DOCONV()) == -1) {
- return tdb->last_error;
+ return TDB_ERR_TO_OFF(tdb->last_error);
}
return (rec.magic == TDB1_RECOVERY_MAGIC);