X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-remap-in-read_traverse.c;h=b70a841aaf8027de24e6bff052aa4ff77b0694ca;hp=85df6612a9d5277158de2ac7b91fc927ca265c01;hb=b929638e3cfe629285af3ecd0813e03eaeaa1133;hpb=41e027e11e0b15100e50c14e49aaa4c2b418f431 diff --git a/ccan/tdb2/test/run-remap-in-read_traverse.c b/ccan/tdb2/test/run-remap-in-read_traverse.c index 85df6612..b70a841a 100644 --- a/ccan/tdb2/test/run-remap-in-read_traverse.c +++ b/ccan/tdb2/test/run-remap-in-read_traverse.c @@ -1,14 +1,6 @@ +#include "tdb2-source.h" /* We had a bug where we marked the tdb read-only for a tdb_traverse_read. * If we then expanded the tdb, we would remap read-only, and later SEGV. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include "external-agent.h" #include "logging.h" @@ -40,7 +32,7 @@ int main(int argc, char *argv[]) unsigned int i; struct agent *agent; struct tdb_context *tdb; - struct tdb_data d = { (unsigned char *)"hello", 5 }; + struct tdb_data d = tdb_mkdata("hello", 5); const char filename[] = "run-remap-in-read_traverse.tdb"; plan_tests(4);