commit 482ef582ecc8facffc3feb407c76b1f775a57849
Author: Oswald Buddenhagen <[email protected]>
Date:   Mon May 20 18:53:22 2013 +0200

    rewrite condition for readability and consistency

 src/sync.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/sync.c b/src/sync.c
index 20b5c66..8b7ea57 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1297,11 +1297,14 @@ box_loaded( int sts, void *aux )
                 * expired message are not counted. */
                todel = svars->ctx[S]->count + svars->new_total[S] - 
svars->chan->max_messages;
                debug( "scheduling %d excess messages for expiration\n", todel 
);
-               for (tmsg = svars->ctx[S]->msgs; tmsg && todel > 0; tmsg = 
tmsg->next)
-                       if (!(tmsg->status & M_DEAD) && (srec = tmsg->srec) &&
+               for (tmsg = svars->ctx[S]->msgs; tmsg && todel > 0; tmsg = 
tmsg->next) {
+                       if (tmsg->status & M_DEAD)
+                               continue;
+                       if ((srec = tmsg->srec) &&
                            ((tmsg->flags | srec->aflags[S]) & ~srec->dflags[S] 
& F_DELETED) &&
                            !(srec->status & (S_EXPIRE|S_EXPIRED)))
                                todel--;
+               }
                debug( "%d non-deleted excess messages\n", todel );
                for (tmsg = svars->ctx[S]->msgs; tmsg; tmsg = tmsg->next) {
                        if (tmsg->status & M_DEAD)

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to