if (!next) {
next = alloc(tdb, 0, sizeof(struct tdb_chain), 0,
TDB_CHAIN_MAGIC, false);
- if (next == TDB_OFF_ERR)
- return tdb->ecode;
+ if (TDB_OFF_IS_ERR(next))
+ return next;
ecode = zero_out(tdb,
next+sizeof(struct tdb_used_record),
sizeof(struct tdb_chain));
}
subhash = alloc(tdb, 0, subsize, 0, magic, false);
- if (subhash == TDB_OFF_ERR) {
- return tdb->ecode;
+ if (TDB_OFF_IS_ERR(subhash)) {
+ return subhash;
}
ecode = zero_out(tdb, subhash + sizeof(struct tdb_used_record),