X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-record-expand.c;h=25c1af3d4082eb8462551ab7cc652588ec8f071d;hp=109a2ed3ddc6343178298e5c27192ebe5a7cba94;hb=c8f6f8c2dea76042f74c02eff048847e62adcca6;hpb=7607ced7aea9b24a62efcd97b5d79c1214a2b2c6 diff --git a/ccan/tdb2/test/run-record-expand.c b/ccan/tdb2/test/run-record-expand.c index 109a2ed3..25c1af3d 100644 --- a/ccan/tdb2/test/run-record-expand.c +++ b/ccan/tdb2/test/run-record-expand.c @@ -1,8 +1,4 @@ -#include -#include -#include -#include -#include +#include "tdb2-source.h" #include #include "logging.h" @@ -16,7 +12,7 @@ int main(int argc, char *argv[]) int flags[] = { TDB_INTERNAL, TDB_DEFAULT, TDB_NOMMAP, TDB_INTERNAL|TDB_CONVERT, TDB_CONVERT, TDB_NOMMAP|TDB_CONVERT }; - struct tdb_data key = { (unsigned char *)"key", 3 }; + struct tdb_data key = tdb_mkdata("key", 3); struct tdb_data data; data.dptr = malloc(MAX_SIZE); @@ -44,5 +40,7 @@ int main(int argc, char *argv[]) tdb_close(tdb); } ok1(tap_log_messages == 0); + free(data.dptr); + return exit_status(); }