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.1.4~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7ab24a3a77f76ec93b19e90289f7ec5c09a58975;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;