From: Francis Deslauriers Date: Fri, 27 Sep 2019 15:56:24 +0000 (-0400) Subject: Cleanup: relayd: Logically dead code X-Git-Tag: v2.12.0-rc1~331 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=17e736a54fe930f716be482a294f803a1e8b6ed0;p=lttng-tools.git Cleanup: relayd: Logically dead code Coverity report: CID 1404935 (#1 of 1): Logically dead code (DEADCODE)dead_error_line: Execution cannot reach the expression 0UL inside this statement: base_path_len = (base_path Reported-by: Coverity (1404935) Logically dead code Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/relayd/relayd.c b/src/common/relayd/relayd.c index a9c2bb2c3..1ba0ccf99 100644 --- a/src/common/relayd/relayd.c +++ b/src/common/relayd/relayd.c @@ -161,7 +161,7 @@ static int relayd_create_session_2_11(struct lttcomm_relayd_sock *rsock, /* The three names are sent with a '\0' delimiter between them. */ session_name_len = strlen(session_name) + 1; hostname_len = strlen(hostname) + 1; - base_path_len = base_path ? strlen(base_path) + 1 : 0; + base_path_len = strlen(base_path) + 1; msg_length = sizeof(*msg) + session_name_len + hostname_len + base_path_len; msg = zmalloc(msg_length);