]> source.dussan.org Git - rspamd.git/commitdiff
Same result checking error found by coverity
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 10 Feb 2016 23:00:22 +0000 (23:00 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 10 Feb 2016 23:10:23 +0000 (23:10 +0000)
src/libmime/mime_expressions.c

index ba2045ee4f0726f716bfe7bf2305224674c21fd8..6b00a61339b617e13ec3dca69a0cbf83e0083b48 100644 (file)
@@ -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;