commit f934e995d6f871c3ca269835b2f990f63055c9fc Author: Oswald Buddenhagen <o...@users.sf.net> Date: Sat Mar 11 13:27:53 2017 +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. src/sync.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sync.c b/src/sync.c index 835547a..485e419 100644 --- 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) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel