-#include <ccan/tdb2/tdb.c>
-#include <ccan/tdb2/open.c>
-#include <ccan/tdb2/free.c>
-#include <ccan/tdb2/lock.c>
-#include <ccan/tdb2/io.c>
-#include <ccan/tdb2/hash.c>
-#include <ccan/tdb2/check.c>
-#include <ccan/tdb2/transaction.c>
+#include "tdb2-source.h"
#include <ccan/tap/tap.h>
#include "logging.h"
static enum TDB_ERROR parse(TDB_DATA key, TDB_DATA data, TDB_DATA *expected)
{
- if (data.dsize != expected->dsize)
- return TDB_ERR_EINVAL;
- if (memcmp(data.dptr, expected->dptr, data.dsize) != 0)
+ if (!tdb_deq(data, *expected))
return TDB_ERR_EINVAL;
return TDB_SUCCESS;
}