commit b1227c0f4bd37614b69a60615182e5dea7de61f9
Author: Oswald Buddenhagen <[email protected]>
Date:   Sat Nov 2 20:02:54 2013 +0100

    simplify condition
    
    ... and document the underlying assertion.

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

diff --git a/src/sync.c b/src/sync.c
index 46125ec..5414d2b 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1050,6 +1050,7 @@ box_loaded( int sts, void *aux )
                debug( "matching previously copied messages on %s\n", str_ms[t] 
);
                match_tuids( svars, t );
        }
+       /* At this point, UIDs on the t side of sync records cannot be -2 any 
more. */
 
        debug( "matching messages on %s against sync records\n", str_ms[t] );
        hashsz = bucketsForSize( svars->nsrecs * 3 );
@@ -1168,7 +1169,7 @@ box_loaded( int sts, void *aux )
                Fprintf( svars->jfp, "%c %d\n", "{}"[t], svars->ctx[t]->uidnext 
);
                for (tmsg = svars->ctx[1-t]->msgs; tmsg; tmsg = tmsg->next) {
                        srec = tmsg->srec;
-                       if (srec ? srec->uid[t] < 0 && (srec->uid[t] == -1 ? 
(svars->chan->ops[t] & OP_RENEW) : (svars->chan->ops[t] & OP_NEW)) : 
(svars->chan->ops[t] & OP_NEW)) {
+                       if (srec ? (srec->uid[t] < 0 && (svars->chan->ops[t] & 
OP_RENEW)) : (svars->chan->ops[t] & OP_NEW)) {
                                debug( "new message %d on %s\n", tmsg->uid, 
str_ms[1-t] );
                                if ((svars->chan->ops[t] & OP_EXPUNGE) && 
(tmsg->flags & F_DELETED))
                                        debug( "  -> not %sing - would be 
expunged anyway\n", str_hl[t] );

------------------------------------------------------------------------------
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