aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-10 23:00:22 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-10 23:10:23 +0000
commit7ab24a3a77f76ec93b19e90289f7ec5c09a58975 (patch)
treeb29cd51462046d74025d684c00bb4fa16f6bbc96
parenta75b186bfabe99a2782cda903fd35b9eae6cd665 (diff)
downloadrspamd-7ab24a3a77f76ec93b19e90289f7ec5c09a58975.tar.gz
rspamd-7ab24a3a77f76ec93b19e90289f7ec5c09a58975.zip
Same result checking error found by coverity
-rw-r--r--src/libmime/mime_expressions.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c
index ba2045ee4..6b00a6133 100644
--- a/src/libmime/mime_expressions.c
+++ b/src/libmime/mime_expressions.c
@@ -1369,12 +1369,16 @@ rspamd_has_fake_html (struct rspamd_task * task, GArray * args, void *unused)
guint i;
gboolean res = FALSE;
- for (i = 0; i < task->text_parts->len && res; i ++) {
+ for (i = 0; i < task->text_parts->len; i ++) {
p = g_ptr_array_index (task->text_parts, i);
if (!IS_PART_EMPTY (p) && IS_PART_HTML (p) && p->html->html_tags == NULL) {
res = TRUE;
}
+
+ if (res) {
+ break;
+ }
}
return res;