From: Vsevolod Stakhov Date: Wed, 10 Feb 2016 23:00:22 +0000 (+0000) Subject: Same result checking error found by coverity X-Git-Tag: 1.2.0~266 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=14e9bb9ec3cd76c86d4dd4e30e840aedba81f20c;p=rspamd.git Same result checking error found by coverity --- 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;