]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/tdb1_tdb.c
tdb2: unify tdb1_delete into tdb_delete.
[ccan] / ccan / tdb2 / tdb1_tdb.c
index 895a8c2ae59218ab43778905df0787c31a96b104..16e945974eaf9e2bcbf6ed213c6e5096bfb18c49 100644 (file)
@@ -434,6 +434,7 @@ int tdb1_delete(struct tdb_context *tdb, TDB_DATA key)
        uint32_t hash = tdb_hash(tdb, key.dptr, key.dsize);
        int ret;
 
+       assert(tdb->flags & TDB_VERSION1);
        ret = tdb1_delete_hash(tdb, key, hash);
        return ret;
 }