]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/test/run-13-delete.c
tdb2: move file operations into separate structure
[ccan] / ccan / tdb2 / test / run-13-delete.c
index 8322ff50c863702d1f2de552a9a6affdc5f9bb07..3eaeee7a29b1ff8e3f707da522d4c6ed7ca29319 100644 (file)
@@ -180,7 +180,8 @@ int main(int argc, char *argv[])
                /* Check mixed bitpattern. */
                test_val(tdb, 0x123456789ABCDEF0ULL);
 
-               ok1(tdb->allrecord_lock.count == 0 && tdb->num_lockrecs == 0);
+               ok1(!tdb->file || (tdb->file->allrecord_lock.count == 0
+                                  && tdb->file->num_lockrecs == 0));
                tdb_close(tdb);
 
                /* Deleting these entries in the db gave problems. */