- if (add_free_record(tdb, recovery_head,
- sizeof(rec) + rec.max_len) != 0) {
- tdb_logerr(tdb, tdb->ecode, TDB_LOG_ERROR,
- "tdb_recovery_allocate:"
- " failed to free previous recovery area");
- return -1;
+ ecode = add_free_record(tdb, recovery_head,
+ sizeof(rec) + rec.max_len);
+ if (ecode != TDB_SUCCESS) {
+ return tdb_logerr(tdb, ecode, TDB_LOG_ERROR,
+ "tdb_recovery_allocate:"
+ " failed to free previous"
+ " recovery area");