sbin/hammer: Refactor left/right boundary elms in hammer show
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 12 Nov 2016 04:11:10 +0000 (13:11 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 12 Nov 2016 06:46:42 +0000 (15:46 +0900)
commitf3c08aaa8e4136d3fd66e2caa7fe45489372f481
tree297f79e98fe5f9ec33266e86db9a8ed235d19874
parentdd96867b90a01e3eb9e8ec1a5cb486ccffa49d47
sbin/hammer: Refactor left/right boundary elms in hammer show

hammer show doesn't need to pass around pointers to left/right
boundary elms in every function while walking the B-Tree.

Left/right elms are there to test whether a B-Tree node in
question fits in boundaries defined by its parent, which means
that hammer show always requires the right elm be (left+1), but
not some random elm after the left elm. Because of this, it
only needs to pass around the left elm.

The code is more efficient plus look better without bunch of
left/right stuff.
sbin/hammer/cmd_show.c