commit 1bf0fb6: [Minor] Move condition

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jul 28 16:21:05 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-07-28 12:39:39 +0100
URL: https://github.com/rspamd/rspamd/commit/1bf0fb60a13b7bb3fa89f5803bcb1c2f32fa04ff

[Minor] Move condition

---
 src/libserver/re_cache.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c
index eeda99616..bd207573b 100644
--- a/src/libserver/re_cache.c
+++ b/src/libserver/re_cache.c
@@ -628,10 +628,10 @@ rspamd_re_cache_process_pcre (struct rspamd_re_runtime *rt,
 				r++;
 				msg_debug_re_task ("found regexp /%s/, total hits: %d",
 						rspamd_regexp_get_pattern (re), r);
+			}
 
-				if (max_hits > 0 && r >= max_hits) {
-					break;
-				}
+			if (max_hits > 0 && r >= max_hits) {
+				break;
 			}
 		}
 


More information about the Commits mailing list