Commit f725bbb1 authored by Rusty Russell's avatar Rusty Russell

htable: fix tools/speed.

As pointed out by Christian Thaeter, it has bitrotted.
parent d3d4303a
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <ccan/hash/hash.h> #include <ccan/hash/hash.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#include <sys/time.h> #include <sys/time.h>
...@@ -28,9 +29,9 @@ static size_t hash_obj(const unsigned int *key) ...@@ -28,9 +29,9 @@ static size_t hash_obj(const unsigned int *key)
return hashl(key, 1, 0); return hashl(key, 1, 0);
} }
static bool cmp(const unsigned int *key1, const unsigned int *key2) static bool cmp(const struct object *object, const unsigned int *key)
{ {
return *key1 == *key2; return object->key == *key;
} }
HTABLE_DEFINE_TYPE(struct object, objkey, hash_obj, cmp, obj); HTABLE_DEFINE_TYPE(struct object, objkey, hash_obj, cmp, obj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment