Coverity warns:
1568451 Structurally dead code
Actions intended to be performed by the unreachable code will never occur.
In relay_thread_listener(void *): Code block is unreachable because of the syntactic structure of the code (CWE-561)
Use the appropriate error label to handle the file creation error.
Change-Id: Id4f4eeae287a135d87ec21b14d1eade2afbb1f2c
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
goto error_sock_control;
}
- if (auto _ret = utils_create_value_file(ntohs(control_sock->sockaddr.addr.sin.sin_port),
- relayd_control_port_path)) {
+ if (const auto _ret = utils_create_value_file(
+ ntohs(control_sock->sockaddr.addr.sin.sin_port), relayd_control_port_path)) {
ERR_FMT("Failed to create control port path file: port={}, path=`{}`, ret={}",
ntohs(control_sock->sockaddr.addr.sin.sin_port),
relayd_control_port_path,
_ret);
- goto error_create_poll;
goto error_sock_relay;
}