Page MenuHomeFreeBSD

pctrie: leave pctrie top as current after [gl]e_lookup failure
ClosedPublic

Authored by dougm on Thu, Jul 10, 2:40 AM.
Tags
None
Referenced Files
F124124149: D51232.id158252.diff
Tue, Jul 22, 7:04 PM
F124124046: D51232.id158251.diff
Tue, Jul 22, 7:02 PM
F124123285: D51232.id.diff
Tue, Jul 22, 6:51 PM
F124122789: D51232.id158255.diff
Tue, Jul 22, 6:44 PM
F124121540: D51232.diff
Tue, Jul 22, 6:23 PM
Unknown Object (File)
Mon, Jul 14, 5:10 AM
Unknown Object (File)
Thu, Jul 10, 8:18 AM
Subscribers

Details

Summary

If pctrie_lookup_iter_ge fails to return a node, the iterator is left with NULL as the current node. Instead, make the top of the tree the current node. Do the same thing for lookup_iter_le. If an iterator is reused after a ge/le lookup fails, this will skip the step in _pctrie_lookup_node where a NULL is replaced by the node at the top of the trie.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dougm requested review of this revision.Thu, Jul 10, 2:40 AM
dougm created this revision.

Handle the case where the pctrie is empty.

This revision is now accepted and ready to land.Thu, Jul 10, 7:53 AM