main: Match getSubTrees* to GetAncestors pattern

getSubTrees, getSubTreePaths and GetAncestors have a code snippet that's
very similar. Unify them so that they are easier to read.

For the ret vector being declared further down, it's better practice to
declare variables closer to where it's going to be used since
we wouldn't have needed ret if we error out early.

Tested: The code is only syntatically different. Tested with the
following commit in more depth.

Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: Ib449ab4ffab502c801040cf6bce28b30507d8e0b
1 file changed
tree: 23eb990bb98e099201d36738b0bd54456c18ba8c
  1. fail-monitor/
  2. libmapper/
  3. src/
  4. subprojects/
  5. .clang-format
  6. .gitignore
  7. LICENSE
  8. MAINTAINERS
  9. meson.build
  10. meson_options.txt
  11. OWNERS
  12. README.md
README.md

Prerequisites

Non-OpenBMC build dependencies are:

  • meson/ninja
  • boost
  • libsystemd
  • systemd
  • tinyxml2

Build

meson build && ninja -C build

Run Unit Tests

meson build && ninja -C build test

Clean the repository

rm -rf build