summaryrefslogtreecommitdiffabout
path: root/frm
authorSergey Poznyakoff <gray@gnu.org.ua>2004-01-13 15:40:04 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2004-01-13 15:40:04 (GMT)
commit0eb20f4388e3133c41c2e45b1355a3d6291e59f7 (patch) (side-by-side diff)
tree0320cc9be2541cca976deb7e994ea3d2fae6809c /frm
parent41fbb0c944d7edd1b0f6de472e2d128bc358f767 (diff)
downloadmailutils-0eb20f4388e3133c41c2e45b1355a3d6291e59f7.tar.gz
mailutils-0eb20f4388e3133c41c2e45b1355a3d6291e59f7.tar.bz2
(action): Optimized select condition
Diffstat (limited to 'frm') (more/less context) (ignore whitespace changes)
-rw-r--r--frm/frm.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/frm/frm.c b/frm/frm.c
index d5cb6ad..5d0abde 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;

Return to:

Send suggestions and report system problems to the System administrator.