- if (tdb_write_off(tdb,
- recovery_head
- + offsetof(struct tdb_recovery_record, magic),
- TDB_RECOVERY_INVALID_MAGIC) == -1) {
- tdb_logerr(tdb, tdb->ecode, TDB_LOG_ERROR,
- "tdb_transaction_recover:"
- " failed to remove recovery magic");
- return -1;
+ ecode = tdb_write_off(tdb,
+ recovery_head
+ + offsetof(struct tdb_recovery_record, magic),
+ TDB_RECOVERY_INVALID_MAGIC);
+ if (ecode != TDB_SUCCESS) {
+ return tdb_logerr(tdb, ecode, TDB_LOG_ERROR,
+ "tdb_transaction_recover:"
+ " failed to remove recovery magic");