tdb2: allow multiple chain locks.
[ccan] / ccan / tdb2 / test / run-56-open-during-transaction.c
index b242eab772ed4cbf73a3dcd8df5650f329aeb49d..96107d637e4472b7026b587f26c031191b1c9631 100644 (file)
@@ -160,10 +160,8 @@ int main(int argc, char *argv[])
 
                opened = true;
                ok1(tdb_transaction_start(tdb) == 0);
-               key.dsize = strlen("hi");
-               key.dptr = (void *)"hi";
-               data.dptr = (void *)"world";
-               data.dsize = strlen("world");
+               key = tdb_mkdata("hi", strlen("hi"));
+               data = tdb_mkdata("world", strlen("world"));
 
                ok1(tdb_store(tdb, key, data, TDB_INSERT) == 0);
                ok1(tdb_transaction_commit(tdb) == 0);