diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-01-20 19:56:03 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-01-20 19:56:03 +0400 |
commit | 661ead901b2ce0d58b3cb374e26c9abc02d96384 (patch) | |
tree | 883bbf52453ec8026dd361560c47e5bbbafed3c1 | |
parent | 9bacf0d835d66aaddcdb9e664a34364f25ed2554 (diff) | |
download | rspamd-661ead901b2ce0d58b3cb374e26c9abc02d96384.tar.gz rspamd-661ead901b2ce0d58b3cb374e26c9abc02d96384.zip |
Fix hashing in events library.
-rw-r--r-- | src/events.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/events.c b/src/events.c index bb5a0a0a8..eb1e26094 100644 --- a/src/events.c +++ b/src/events.c @@ -44,17 +44,8 @@ static guint rspamd_event_hash (gconstpointer a) { const struct rspamd_async_event *ev = a; - guint h = 0, i; - gchar *p; - - p = (gchar *)ev->user_data; - for (i = 0; i < sizeof (gpointer); i ++) { - h ^= *p; - h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24); - p ++; - } - return h; + return GPOINTER_TO_UINT (ev->user_data); } struct rspamd_async_session * |