From: Jérémie Galarneau Date: Wed, 27 Nov 2019 18:20:32 +0000 (-0500) Subject: relayd: clean-up: reduce the number of exit paths in main() X-Git-Tag: v2.12.0-rc1~66 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=794e2e5f064718252b249e17914c9b2b089d8d0c;hp=794e2e5f064718252b249e17914c9b2b089d8d0c relayd: clean-up: reduce the number of exit paths in main() The relay daemons's initialization and teardown relies on a large number of goto/labels to clean-up on failure to launch. All of the clean-up can be performed unconditionally by checking for NULL or uninitialized file descriptors in relayd_cleanup(). This reduces the number of possible tear-down paths and partly initialized state to keep track of. Signed-off-by: Jérémie Galarneau Change-Id: I3195caf05b3dd04cc7e9c60dcb322261159fe0df ---