From 7ab24a3a77f76ec93b19e90289f7ec5c09a58975 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 10 Feb 2016 23:00:22 +0000 Subject: [PATCH] Same result checking error found by coverity --- src/libmime/mime_expressions.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.39.5