isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit f934e995d6f871c3ca269835b2f990f63055c9fc
parent f62b3c7be96a194854073bca1478586f0f63d9dc
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sat, 11 Mar 2017 13:27:53 +0100

don't populate sync record map with invalid UIDs

this would obviously just bloat the hash with nonsense, slowing down the
actual lookup later.

Diffstat:
Msrc/sync.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/sync.c b/src/sync.c @@ -1356,6 +1356,8 @@ box_loaded( int sts, void *aux ) if (srec->status & S_DEAD) continue; uid = srec->uid[t]; + if (uid <= 0) + continue; idx = (uint)((uint)uid * 1103515245U) % hashsz; while (srecmap[idx].uid) if (++idx == hashsz)