X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-tdb1-check.c;h=f05608feaadc1929a4804f219b456ce1ae66fc58;hb=22d0e0dc59fc9d7e0046fec6971ef478c2d604fd;hp=03b0191a17168d5cac68a45383dfdb41fa0bf15f;hpb=fab544c24c1ad6523f95893abcaec4e6cce6c2b4;p=ccan diff --git a/ccan/tdb2/test/run-tdb1-check.c b/ccan/tdb2/test/run-tdb1-check.c index 03b0191a..f05608fe 100644 --- a/ccan/tdb2/test/run-tdb1-check.c +++ b/ccan/tdb2/test/run-tdb1-check.c @@ -7,10 +7,10 @@ int main(int argc, char *argv[]) { struct tdb1_context *tdb; - TDB1_DATA key, data; + 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! */