]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/test/run-15-append.c
tdb2: rework hash.c functions to return enum TDB_ERROR.
[ccan] / ccan / tdb2 / test / run-15-append.c
index 545175a4885cb5b3e289fd277ea29b69c8007825..36b6162fbd0802e783c6611be8fdaf081ee90661 100644 (file)
@@ -19,7 +19,7 @@ static tdb_off_t tdb_offset(struct tdb_context *tdb, struct tdb_data key)
        struct hash_info h;
 
        off = find_and_lock(tdb, key, F_RDLCK, &h, &rec, NULL);
-       if (unlikely(off == TDB_OFF_ERR))
+       if (TDB_OFF_IS_ERR(off))
                return 0;
        tdb_unlock_hashes(tdb, h.hlock_start, h.hlock_range, F_RDLCK);
        return off;