X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-12-store.c;h=dc32d91cde5a6d918527ca8a71fa562878b57cf8;hb=3d917ba6dffe2029608a3d4c870dfdb4033ca4c9;hp=fd53a92b9fedceec23ac6f548c3606193fdd40e2;hpb=6804501c350181dea8f531142b28c620b70edbd9;p=ccan diff --git a/ccan/tdb2/test/run-12-store.c b/ccan/tdb2/test/run-12-store.c index fd53a92b..dc32d91c 100644 --- a/ccan/tdb2/test/run-12-store.c +++ b/ccan/tdb2/test/run-12-store.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "logging.h" @@ -49,8 +50,11 @@ int main(int argc, char *argv[]) /* We seemed to lose some keys. * Insert and check they're in there! */ for (j = 0; j < 500; j++) { + struct tdb_data d; ok1(tdb_store(tdb, key, data, TDB_REPLACE) == 0); - ok1(equal(tdb_fetch(tdb, key), data)); + d = tdb_fetch(tdb, key); + ok1(equal(d, data)); + free(d.dptr); } tdb_close(tdb); }