Coverity reports:
1442789 Logically dead code
The indicated dead code may have performed some action; that action will never occur.
In lttng_health_create_relayd: Code can never be reached because of a logical contradiction (CWE-561)
`path` is already checked for NULL before reaching the lttng_strncpy
call.
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ifce95c37a6fe7f914a3bbc5443171c511d3c211a
goto error;
}
- ret = lttng_strncpy(lh->health_sock_path, path ?: "",
- sizeof(lh->health_sock_path));
+ ret = lttng_strncpy(lh->health_sock_path, path,
+ sizeof(lh->health_sock_path));
if (ret) {
goto error;
}