projects
/
platform
/
upstream
/
kmscon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e06e93
)
misc: fix rehashing hashtable entries
author
David Herrmann
<dh.herrmann@googlemail.com>
Wed, 8 Aug 2012 13:13:49 +0000
(15:13 +0200)
committer
David Herrmann
<dh.herrmann@googlemail.com>
Wed, 8 Aug 2012 13:13:49 +0000
(15:13 +0200)
We need to hash the key instead of the whole entry, otherwise, we have
dead/wrong entries in the hash-table after a rehash-round.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/static_misc.c
patch
|
blob
|
history
diff --git
a/src/static_misc.c
b/src/static_misc.c
index
db49135
..
a6714e1
100644
(file)
--- a/
src/static_misc.c
+++ b/
src/static_misc.c
@@
-305,8
+305,9
@@
bool kmscon_direct_equal(const void *data1, const void *data2)
static size_t rehash(const void *ele, void *priv)
{
struct kmscon_hashtable *tbl = priv;
+ const struct kmscon_hashentry *ent = ele;
- return tbl->hash_cb(e
le
);
+ return tbl->hash_cb(e
nt->key
);
}
int kmscon_hashtable_new(struct kmscon_hashtable **out,