X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-11-simple-fetch.c;h=ad1933cd3b0566f3e005b6a428efc85374eb04e2;hb=f6067e4cbd7b7415571f12438aec00faec5657fb;hp=447da9c2b5ee95d281d34f1f051806db1cf893f2;hpb=399c393dd31e7430adbaf9526fc95513e0e0e1fb;p=ccan diff --git a/ccan/tdb2/test/run-11-simple-fetch.c b/ccan/tdb2/test/run-11-simple-fetch.c index 447da9c2..ad1933cd 100644 --- a/ccan/tdb2/test/run-11-simple-fetch.c +++ b/ccan/tdb2/test/run-11-simple-fetch.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -43,7 +44,7 @@ int main(int argc, char *argv[]) O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr); ok1(tdb); if (tdb) { - struct tdb_data d; + struct tdb_data d = { NULL, 0 }; /* Bogus GCC warning */ /* fetch should fail. */ failtest_suppress = false; @@ -59,7 +60,7 @@ int main(int argc, char *argv[]) if (!ok1(tdb_fetch(tdb, key, &d) == TDB_SUCCESS)) goto fail; failtest_suppress = true; - ok1(data_equal(d, data)); + ok1(tdb_deq(d, data)); free(d.dptr); ok1(tdb_check(tdb, NULL, NULL) == 0); tdb_close(tdb);