tdb: Remove unnecessary checks
authorVolker Lendecke <vl@samba.org>
Wed, 10 Aug 2016 09:31:44 +0000 (11:31 +0200)
committerRalph Boehme <slow@samba.org>
Mon, 29 Aug 2016 17:03:26 +0000 (19:03 +0200)
This has already been done in tdb_find()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/tdb/common/tdb.c

index b3dbc715153946b3f915572f52adfabab72a8d33..0f362cf0c33b8e8072552bd6187adb371d23e457 100644 (file)
@@ -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;
        }