From 0eb20f4388e3133c41c2e45b1355a3d6291e59f7 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 13 Jan 2004 15:40:04 +0000 Subject: (action): Optimized select condition --- frm/frm.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'frm') diff --git a/frm/frm.c b/frm/frm.c index d5cb6adfe..5d0abde5c 100644 --- a/frm/frm.c +++ b/frm/frm.c @@ -350,24 +350,10 @@ action (observer_t o, size_t type) message_get_attribute (msg, &attr); message_get_header (msg, &hdr); - if (select_attribute - && (select_attribute & IS_READ) - && (!attribute_is_read (attr))) - { - break; - } - else if (select_attribute - && (select_attribute & IS_NEW) - && (!attribute_is_recent (attr))) - { - break; - } - else if (select_attribute - && (select_attribute & IS_OLD) - && (!attribute_is_seen (attr))) - { - break; - } + if (((select_attribute & IS_READ) && (!attribute_is_read (attr))) + || (select_attribute & IS_NEW) && (!attribute_is_recent (attr)) + || (select_attribute & IS_OLD) && (!attribute_is_seen (attr))) + break; if (attribute_is_recent (attr)) have_new_mail = 1; -- cgit v1.2.1