mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-04 10:39:50 +00:00
implement ht idx wrap around less strangely, add comment
This commit is contained in:
parent
51189e1383
commit
241eaec413
1 changed files with 2 additions and 2 deletions
|
@ -173,8 +173,8 @@ hashindex_lookup(HashIndex *index, const unsigned char *key, int *start_idx)
|
|||
return idx;
|
||||
}
|
||||
idx++;
|
||||
if (idx >= index->num_buckets) {
|
||||
idx -= index->num_buckets;
|
||||
if (idx >= index->num_buckets) { /* triggers at == already */
|
||||
idx = 0;
|
||||
}
|
||||
if(idx == start) {
|
||||
/* We have done a full pass over all buckets.
|
||||
|
|
Loading…
Add table
Reference in a new issue