Browse Source

don't populate sync record map with invalid UIDs

this would obviously just bloat the hash with nonsense, slowing down the
actual lookup later.
1.2
Oswald Buddenhagen 8 years ago
parent
commit
f934e995d6
  1. 2
      src/sync.c

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

Loading…
Cancel
Save