From 335db24f7fbae883e3ed58ee701bc405a31aa959 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 18 Mar 2015 17:38:13 +0000 Subject: [PATCH] Use const pointer for LRU cache search. --- src/libutil/hash.c | 2 +- src/libutil/hash.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libutil/hash.c b/src/libutil/hash.c index 7610a4a9a..0a09e3b11 100644 --- a/src/libutil/hash.c +++ b/src/libutil/hash.c @@ -124,7 +124,7 @@ rspamd_lru_hash_new ( } gpointer -rspamd_lru_hash_lookup (rspamd_lru_hash_t *hash, gpointer key, time_t now) +rspamd_lru_hash_lookup (rspamd_lru_hash_t *hash, gconstpointer key, time_t now) { rspamd_lru_element_t *res; GList *cur, *tmp; diff --git a/src/libutil/hash.h b/src/libutil/hash.h index 58a6e9e19..022548f3c 100644 --- a/src/libutil/hash.h +++ b/src/libutil/hash.h @@ -50,7 +50,7 @@ rspamd_lru_hash_t * rspamd_lru_hash_new_full ( * @return value of key or NULL if key is not found */ gpointer rspamd_lru_hash_lookup (rspamd_lru_hash_t *hash, - gpointer key, + gconstpointer key, time_t now); /** * Insert item in hash -- 2.39.5