relayd: clean-up: reduce the number of exit paths in main()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 27 Nov 2019 18:20:32 +0000 (13:20 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jan 2020 06:55:34 +0000 (01:55 -0500)
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 <jeremie.galarneau@efficios.com>
Change-Id: I3195caf05b3dd04cc7e9c60dcb322261159fe0df


No differences found
This page took 0.024563 seconds and 4 git commands to generate.