Change tdestroy() to immediately free a node with no right child as soon as it is encountered. Currently, such nodes are visited twice before deletion.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Did you tested this with lib/libc/tests/stdlib/tsearch_test.c?
If it works, I am fine with it.
Comment Actions
$ kyua test -k /usr/tests/Kyuafile lib/libc/stdlib/tsearch_test
lib/libc/stdlib/tsearch_test:tdestroy_test -> passed [0.001s]
lib/libc/stdlib/tsearch_test:tsearch_test -> passed [0.030s]