]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/tdb1_check.c
tdb2: Make TDB1 use the same tdb_hash() wrapper as TDB2
[ccan] / ccan / tdb2 / tdb1_check.c
index 51b8b594f414bb5539ddaa09dacbccee2ab9b220..edbfd86bcfe1041168931f6102e014d3e6c58bbf 100644 (file)
@@ -255,7 +255,7 @@ static bool tdb1_check_used_record(struct tdb1_context *tdb,
        if (!key.dptr)
                return false;
 
-       if (tdb->hash_fn(&key) != rec->full_hash) {
+       if ((uint32_t)tdb_hash(tdb, key.dptr, key.dsize) != rec->full_hash) {
                tdb->last_error = tdb_logerr(tdb, TDB_ERR_CORRUPT, TDB_LOG_ERROR,
                                        "Record offset %d has incorrect hash\n", off);
                goto fail_put_key;