lib: tree: Fix function names and return types

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>