]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb/check.c
compiler: use everywhere.
[ccan] / ccan / tdb / check.c
index 955f255484a720a08a07a9e33a1fde6b0036b49c..fa003b79aebabd28aed807c4f9ca1d65d3014d09 100644 (file)
@@ -40,7 +40,7 @@ static bool tdb_check_header(struct tdb_context *tdb, tdb_off_t *recovery)
        if (hdr.version != TDB_VERSION)
                goto corrupt;
 
-       if (hdr.rwlocks != 0)
+       if (hdr.rwlocks != 0 && hdr.rwlocks != TDB_HASH_RWLOCK_MAGIC)
                goto corrupt;
 
        tdb_header_hash(tdb, &h1, &h2);