ソースを参照

don't populate sync record map with invalid UIDs

this would obviously just bloat the hash with nonsense, slowing down the
actual lookup later.
Oswald Buddenhagen 8 年 前
コミット
f934e995d6
1 ファイル変更2 行追加0 行削除
  1. 2 0
      src/sync.c

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