Commit 694204f
authored
hp_list: Fix bug in list_hp_retire (#10)
In list_hp_retire function of hp_list, the original code would skip the
next element if a deletion happens. It was incorrect because of its
neglect to adjust the index simultaneously, skipping track of the
object origin from &rl->list[iret + 1].
This patch then changed the behavior as:
- If reorganize happens, keep the same index for next iteration.
- Else, index++.1 parent 381cb8c commit 694204f
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
| |||
0 commit comments