aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/re_cache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-07-08 21:55:04 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-07-08 21:55:04 +0100
commit7374691f84fd8e0cc64877ad6e42c6d8b3b784b8 (patch)
tree829a556edbfa724131960585a33a020b2639315f /src/libserver/re_cache.c
parent62f2b93753586fdff2b68e9b50813f13892460af (diff)
downloadrspamd-7374691f84fd8e0cc64877ad6e42c6d8b3b784b8.tar.gz
rspamd-7374691f84fd8e0cc64877ad6e42c6d8b3b784b8.zip
[Minor] Some more fixes towards hyperscan obsoletion reasoning
Diffstat (limited to 'src/libserver/re_cache.c')
-rw-r--r--src/libserver/re_cache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c
index a98ea5056..cb454d16d 100644
--- a/src/libserver/re_cache.c
+++ b/src/libserver/re_cache.c
@@ -2387,7 +2387,7 @@ rspamd_re_cache_is_valid_hyperscan_file (struct rspamd_re_cache *cache,
return FALSE;
}
- if (memcmp (&test_plt, &cache->plt, sizeof (test_plt)) != 0) {
+ if (test_plt.cpu_features != cache->plt.cpu_features) {
msg_err_re_cache ("cannot open hyperscan cache file %s: "
"compiled for a different platform",
path);
@@ -2483,10 +2483,11 @@ rspamd_re_cache_is_valid_hyperscan_file (struct rspamd_re_cache *cache,
if (!silent) {
msg_warn_re_cache ("unknown hyperscan cache file %s", path);
- g_set_error(err, rspamd_re_cache_quark(), 0,
- "unknown hyperscan file");
}
+ g_set_error(err, rspamd_re_cache_quark(), 0,
+ "unknown hyperscan file");
+
return FALSE;
#endif
}