off = tdb_read_off(tdb, off + offsetof(struct tdb_chain, next));
if (TDB_OFF_IS_ERR(off)) {
- return off;
+ return TDB_OFF_TO_ERR(off);
}
if (off == 0)
return TDB_SUCCESS;
h = bucket_off(ftable_off, i);
for (off = tdb_read_off(tdb, h); off; off = f.next) {
if (TDB_OFF_IS_ERR(off)) {
- return off;
+ return TDB_OFF_TO_ERR(off);
}
if (!first) {
off &= TDB_OFF_MASK;
char c;
ecode = tdb->tdb2.io->tread(tdb, off, &c, 1);
if (ecode != TDB_SUCCESS) {
- return ecode;
+ return TDB_ERR_TO_OFF(ecode);
}
if (c != 0 && c != 0x43)
break;
} else {
len = dead_space(tdb, off);
if (TDB_OFF_IS_ERR(len)) {
- return len;
+ return TDB_OFF_TO_ERR(len);
}
if (len < sizeof(rec.r)) {
return tdb_logerr(tdb, TDB_ERR_CORRUPT,
for (ft = first_ftable(tdb); ft; ft = next_ftable(tdb, ft)) {
if (TDB_OFF_IS_ERR(ft)) {
- ecode = ft;
+ ecode = TDB_OFF_TO_ERR(ft);
goto out;
}
ecode = check_free_table(tdb, ft, num_ftables, fr, num_free,