From 36d319b084b7082f85196464959d0b9287967d6a Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 23 Oct 2021 02:34:18 -0400 Subject: Open Plugins Ignore hash for lang Ids no need to look up a hash when we have another searchable field remove some un-needed checks Change-Id: I394e5f796a164aa4bcb68a56ca02cd6a7f18d332 --- apps/open_plugin.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/open_plugin.h') diff --git a/apps/open_plugin.h b/apps/open_plugin.h index adfb9a75bc..d16be2052c 100644 --- a/apps/open_plugin.h +++ b/apps/open_plugin.h @@ -67,11 +67,12 @@ struct open_plugin_entry_t offsetof(struct open_plugin_entry_t, path) + \ offsetof(struct open_plugin_entry_t, param)) +#define OPEN_PLUGIN_SEED 0x811C9DC5; //seed, 2166136261; inline static void open_plugin_get_hash(const char *key, uint32_t *hash) { /* Calculate modified FNV1a hash of string */ const uint32_t p = 16777619; - *hash = 0x811C9DC5; //seed, 2166136261; + *hash = OPEN_PLUGIN_SEED; while(*key) *hash = (*key++ ^ *hash) * p; } -- cgit v1.2.3