From: Rusty Russell Date: Mon, 29 Aug 2011 08:02:41 +0000 (+0930) Subject: htable: fix tools/speed. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=f725bbb1987284933e0f21dfb8f2ce7a1f0806e5;hp=d3d4303acd139e8c34f11067333c000a3f885307 htable: fix tools/speed. As pointed out by Christian Thaeter, it has bitrotted. --- diff --git a/ccan/htable/tools/speed.c b/ccan/htable/tools/speed.c index 26231924..194f1120 100644 --- a/ccan/htable/tools/speed.c +++ b/ccan/htable/tools/speed.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -28,9 +29,9 @@ static size_t hash_obj(const unsigned int *key) 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);