Remove old run-tests, clean up #includes to all be <ccan/...
[ccan] / ccan / tdb / test / run-traverse-in-transaction.c
index e8d6819a93be99f3c2c52632e6deac8b488e3859..0043a98eaf3a714b2f99adc9b7bb04cd5423a11e 100644 (file)
@@ -14,7 +14,7 @@
 #include <err.h>
 #include "external-transaction.h"
 
 #include <err.h>
 #include "external-transaction.h"
 
-static int agent;
+static struct agent *agent;
 
 static bool correct_key(TDB_DATA key)
 {
 
 static bool correct_key(TDB_DATA key)
 {
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
 
        plan_tests(13);
        agent = prepare_external_agent();
 
        plan_tests(13);
        agent = prepare_external_agent();
-       if (agent < 0)
+       if (!agent)
                err(1, "preparing agent");
 
        tdb = tdb_open("/tmp/test2.tdb", 1024, TDB_CLEAR_IF_FIRST,
                err(1, "preparing agent");
 
        tdb = tdb_open("/tmp/test2.tdb", 1024, TDB_CLEAR_IF_FIRST,