X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb%2Ftest%2Frun-oldhash.c;h=a40600fa7162adb5927bc75794c5153173f2c95f;hp=8e5a76f8c8dfa855971239a1fdf6f19ce83f52e5;hb=d117f992bde6b7157a8eecbce8a026f2aa7ab4ae;hpb=44eea6ca52a2de5a817cf54d5d206969845dee3d diff --git a/ccan/tdb/test/run-oldhash.c b/ccan/tdb/test/run-oldhash.c index 8e5a76f8..a40600fa 100644 --- a/ccan/tdb/test/run-oldhash.c +++ b/ccan/tdb/test/run-oldhash.c @@ -9,17 +9,12 @@ #include #include #include -#include +#include #include #include #include #include "logging.h" -static unsigned int jenkins_hash(TDB_DATA *key) -{ - return hash_stable(key->dptr, key->dsize, 0); -} - int main(int argc, char *argv[]) { struct tdb_context *tdb; @@ -41,13 +36,13 @@ int main(int argc, char *argv[]) tdb_close(tdb); tdb = tdb_open_ex("test/old-nohash-le.tdb", 0, 0, O_RDWR, 0, - &taplogctx, jenkins_hash); + &taplogctx, tdb_jenkins_hash); ok1(tdb); ok1(tdb_check(tdb, NULL, NULL) == 0); tdb_close(tdb); tdb = tdb_open_ex("test/old-nohash-be.tdb", 0, 0, O_RDWR, 0, - &taplogctx, jenkins_hash); + &taplogctx, tdb_jenkins_hash); ok1(tdb); ok1(tdb_check(tdb, NULL, NULL) == 0); tdb_close(tdb);