don't populate sync record map with invalid UIDs

this would obviously just bloat the hash with nonsense, slowing down the
actual lookup later.
This commit is contained in:
Oswald Buddenhagen 2017-03-11 13:27:53 +01:00
parent f62b3c7be9
commit f934e995d6

View File

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