]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/test/run-tdb1-check.c
tdb2: make jenkins_hash function non-static, rename to tdb_jenkins_hash.
[ccan] / ccan / tdb2 / test / run-tdb1-check.c
index 03b0191a17168d5cac68a45383dfdb41fa0bf15f..9864e42c56a182d524f0ce7414ac4ed079b1ff45 100644 (file)
@@ -6,11 +6,11 @@
 
 int main(int argc, char *argv[])
 {
-       struct tdb1_context *tdb;
-       TDB1_DATA key, data;
+       struct tdb_context *tdb;
+       TDB_DATA key, data;
 
        plan_tests(13);
-       tdb = tdb1_open_ex("run-check.tdb", 1, TDB1_CLEAR_IF_FIRST,
+       tdb = tdb1_open_ex("run-check.tdb", 1, TDB_DEFAULT,
                          O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL);
 
        ok1(tdb);
@@ -21,7 +21,7 @@ int main(int argc, char *argv[])
        data.dsize = strlen("world");
        data.dptr = (void *)"world";
 
-       ok1(tdb1_store(tdb, key, data, TDB1_INSERT) == 0);
+       ok1(tdb1_store(tdb, key, data, TDB_INSERT) == 0);
        ok1(tdb1_check(tdb, NULL, NULL) == 0);
        tdb1_close(tdb);
 
@@ -35,7 +35,7 @@ int main(int argc, char *argv[])
                          &taplogctx, NULL);
        ok1(tdb);
        ok1(tdb1_check(tdb, NULL, NULL) == -1);
-       ok1(tdb1_error(tdb) == TDB1_ERR_CORRUPT);
+       ok1(tdb_error(tdb) == TDB_ERR_CORRUPT);
        tdb1_close(tdb);
 
        /* Big and little endian should work! */