From babd5432ed91dec1b64b966e2a6633b9642a82d5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 10 Aug 2016 11:31:44 +0200 Subject: [PATCH] tdb: Remove unnecessary checks This has already been done in tdb_find() Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- lib/tdb/common/tdb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/tdb/common/tdb.c b/lib/tdb/common/tdb.c index b3dbc7151539..0f362cf0c33b 100644 --- a/lib/tdb/common/tdb.c +++ b/lib/tdb/common/tdb.c @@ -157,9 +157,7 @@ static int tdb_update_hash(struct tdb_context *tdb, TDB_DATA key, uint32_t hash, /* it could be an exact duplicate of what is there - this is * surprisingly common (eg. with a ldb re-index). */ - if (rec.key_len == key.dsize && - rec.data_len == dbuf.dsize && - rec.full_hash == hash && + if (rec.data_len == dbuf.dsize && tdb_parse_record(tdb, key, tdb_update_hash_cmp, &dbuf) == 0) { return 0; } -- 2.34.1