git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11c9046
)
lib/ccan/htable: fix tools/speed.
author
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 5 Dec 2011 06:12:44 +0000
(16:42 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 5 Dec 2011 06:12:44 +0000
(16:42 +1030)
As pointed out by Christian Thaeter, it has bitrotted.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit
f725bbb1987284933e0f21dfb8f2ce7a1f0806e5
)
lib/ccan/htable/tools/speed.c
patch
|
blob
|
history
diff --git
a/lib/ccan/htable/tools/speed.c
b/lib/ccan/htable/tools/speed.c
index 26231924a1f68b33cfe244b21981d0cb4ca5ebe2..194f11201f01c9d08aa5647f4a8436c1175a03de 100644
(file)
--- a/
lib/ccan/htable/tools/speed.c
+++ b/
lib/ccan/htable/tools/speed.c
@@
-4,6
+4,7
@@
#include <ccan/hash/hash.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/time.h>
@@
-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);