From b894447af1f062e6567933ccf1b5989a9da7fbf7 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 8 Dec 2023 11:11:06 +0100 Subject: [PATCH] [hash] drop const for key --- src/util/hash.c | 2 +- src/util/hash.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/hash.c b/src/util/hash.c index c0c759ce..3d34ab11 100644 --- a/src/util/hash.c +++ b/src/util/hash.c @@ -92,7 +92,7 @@ add_hash_item(struct hash *hash, const char *key, unsigned int keylen, hashval = hash->func(key, keylen, HASH_MAGIC) & hash_mask(hash->width); - item->key = key; + item->key = (char *)key; item->keylen = keylen; item->value = value; diff --git a/src/util/hash.h b/src/util/hash.h index 143b9d08..4f35c2ea 100644 --- a/src/util/hash.h +++ b/src/util/hash.h @@ -16,7 +16,7 @@ typedef hash_value_T (* hash_func_T)(const char *key, unsigned int keylen, hash_ struct hash_item { LIST_HEAD_EL(struct hash_item); - const char *key; + char *key; unsigned int keylen; void *value; };