Cleanup: relayd: Logically dead code
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 27 Sep 2019 15:56:24 +0000 (11:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 3 Oct 2019 00:31:33 +0000 (20:31 -0400)
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 <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/relayd/relayd.c

index a9c2bb2c36d65829d741ce5b864ed8e7549ff2ed..1ba0ccf99bdcb9586f8299e3295d43c3f75af13c 100644 (file)
@@ -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);
This page took 0.035154 seconds and 4 git commands to generate.